Skip to content

Commit

Permalink
Merge pull request HabitRPG#4461 from negue/markdownText
Browse files Browse the repository at this point in the history
change markdown ngModel to text attribute
  • Loading branch information
negue committed Jan 5, 2015
2 parents cc7b2f7 + b3ccdc2 commit ad8add5
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion views/main/filters.jade
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@
li.filters-tags(ng-class='{active: user.filters[tag.id], challenge: tag.challenge}', ng-repeat='tag in user.tags', bindonce='user.tags')
a(ng-click='toggleFilter(tag)')
span.glyphicon.glyphicon-bullhorn(ng-if="::tag.challenge")
markdown(ng-model='tag.name')
markdown(text='tag.name')
// <li class="{#unless activeFilters(users[_userId].filters)}hidden{/}">
2 changes: 1 addition & 1 deletion views/options/profile.jade
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ script(id='partials/options.profile.profile.html', type='text/ng-template')
| &nbsp;-

h4=env.t('displayBlurb')
markdown(ng-show='profile.profile.blurb', ng-model='profile.profile.blurb')
markdown(ng-show='profile.profile.blurb', text='profile.profile.blurb')
span.muted(ng-hide='profile.profile.blurb') -&nbsp;
=env.t('none')
| &nbsp;-
Expand Down
2 changes: 1 addition & 1 deletion views/options/social/challenges.jade
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ script(type='text/ng-template', id='partials/options.social.challenges.detail.ht
hr

.well(bindonce='challenge', ng-if='challenge.description')
markdown(ng-model='challenge.description')
markdown(text='challenge.description')
.modal-body=env.t('challengeDiscription')
habitrpg-tasks(obj='challenge', main=false)

Expand Down
2 changes: 1 addition & 1 deletion views/options/social/chat-message.jade
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ mixin chatMessages(inbox)
span {{::message.user}}&nbsp;
span(ng-class='userAdminGlyphiconStyleFromLevel(message.contributor.level)')
// this invisible username label is here to push the message text far enough right that the visible label can be floated to this point without covering up any of the text
markdown(ng-model='::message.text')
markdown(text='::message.text')
| -
span.muted.time(from-now='::message.timestamp' tooltip="{{::message.timestamp | date:user.preferences.dateFormat.concat(' HH:mm:ss')}}")
unless inbox
Expand Down
4 changes: 2 additions & 2 deletions views/options/social/group.jade
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ a.pull-right.gem-wallet(ng-if='group.type!="party"', popover-trigger='mouseenter

div(ng-show='!group._editing')
img.pull-right(ng-show='group.logo', ng-src='{{group.logo}}')
markdown(ng-model='group.description')
markdown(text='group.description')
hr
small.muted Group ID: {{group._id}}

Expand Down Expand Up @@ -113,7 +113,7 @@ a.pull-right.gem-wallet(ng-if='group.type!="party"', popover-trigger='mouseenter
.arrow
h3.popover-title {{Members.members[group.leader].profile.name}}
.popover-content
markdown(ng-model='group.leaderMessage')
markdown(text='group.leaderMessage')
div(ng-controller='ChatCtrl')
h3=env.t('chat')
include ./chat-box
Expand Down
2 changes: 1 addition & 1 deletion views/options/social/hall.jade
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ script(type='text/ng-template', id='partials/options.social.hall.heroes.html')
td {{hero.contributor.level}}
td {{hero.contributor.text}}
td
markdown(ng-model='hero.contributor.contributions', target='_blank')
markdown(text='hero.contributor.contributions', target='_blank')

script(type='text/ng-template', id='partials/options.social.hall.patrons.html')
table.table.table-striped(infinite-scroll="loadMore()")
Expand Down
4 changes: 2 additions & 2 deletions views/shared/modals/members.jade
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ script(type='text/ng-template', id='modals/member.html')
.row
.col-md-6
img(ng-show='::profile.profile.imageUrl', ng-src='{{::profile.profile.imageUrl}}')
markdown(ng-show='::profile.profile.blurb', ng-model='::profile.profile.blurb')
markdown(ng-show='::profile.profile.blurb', text='::profile.profile.blurb')
ul.muted.list-unstyled(ng-if='::profile.auth.timestamps')
li {{profile._id}}
li(ng-show='::profile.auth.timestamps.created')
Expand Down Expand Up @@ -94,7 +94,7 @@ script(type='text/ng-template', id='modals/abuse-flag.html')
h4!=env.t('abuseFlagModalHeading', {name: "<span class='text-danger'>{{profile.profile.name}}</span>"})
.modal-body
blockquote
markdown(ng-model="abuseObject.text")
markdown(text="abuseObject.text")
p!=env.t('abuseFlagModalBody', {firstLinkStart: "<a href='/static/community-guidelines' target='_blank'>", secondLinkStart: "<a href='/static/terms' target='_blank'>", linkEnd: "</a>"})
.modal-footer
button.pull-left.btn.btn-danger(ng-click='clearFlagCount(abuseObject, groupId)', ng-if='user.contributor.admin && abuseObject.flagCount >= 2')
Expand Down
6 changes: 3 additions & 3 deletions views/shared/tasks/task.jade
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,14 @@ li(bindonce='list', id='task-{{::task.id}}', ng-repeat='task in obj[list.type+"s

// main content
div.task-text(ng-dblclick='task._editing ? saveTask(task) : editTask(task)')
markdown(ng-model='task.text',target='_blank')
markdown(text='task.text',target='_blank')
//-| {{task.text}}
div(ng-if='task.checklist && !$state.includes("options.social.challenges") && !task.collapseChecklist && !task._editing')
fieldset.option-group.task-checklist
label.checkbox(ng-repeat='item in task.checklist')
input(type='checkbox',ng-model='item.completed',ng-change='saveTask(task,true)')
markdown(ng-model='item.text',target='_blank')
markdown(text='item.text',target='_blank')

// edit/options dialog
div(ng-if='task._editing')
Expand Down Expand Up @@ -198,7 +198,7 @@ li(bindonce='list', id='task-{{::task.id}}', ng-repeat='task in obj[list.type+"s
p.option-title.mega(ng-click='task._tags = !task._tags', tooltip=env.t('expandCollapse'))=env.t('tags')
label.checkbox(ng-repeat='tag in user.tags', ng-class="{visuallyhidden: task._tags}")
input(type='checkbox', ng-model='task.tags[tag.id]')
markdown(ng-model='tag.name')
markdown(text='tag.name')

// Advanced Options
span(ng-if='::task.type!="reward"')
Expand Down

0 comments on commit ad8add5

Please sign in to comment.