temporary fix on _purl, using $().val() instead of view binding

This commit is contained in:
Tyler Renelle 2012-08-23 22:54:09 -04:00
parent 8dfa4a862b
commit e4524e0958
3 changed files with 5 additions and 4 deletions

View file

@ -74,7 +74,7 @@ get('/:uidParam?', function(page, model, _arg) {
ready(function(model) {
var poormanscron, setupSortable, step, tour, type, _i, _j, _len, _len1, _ref1, _ref2;
model.set('_purl', window.location.origin + '/' + model.get('_userId'));
$('#purl-link').val(window.location.toString() + model.get('_userId'));
$('[rel=popover]').popover();
model.on('set', '*', function() {
return $('[rel=popover]').popover();

View file

@ -70,7 +70,8 @@ get '/:uidParam?', (page, model, {uidParam}) ->
ready (model) ->
model.set('_purl', (window.location.origin + '/' + model.get('_userId')))
# FIXME weirdest thing: doing model.set('_purl',...) and binding {_purl} in the view does not work
$('#purl-link').val(window.location.toString() + model.get('_userId'))
$('[rel=popover]').popover()
#TODO: this isn't very efficient, do model.on set for specific attrs for popover
@ -109,7 +110,7 @@ ready (model) ->
content: step.content
placement: step.placement
tour.start()
model.on 'set', '_user.tasks.*.completed', (i, completed, previous, isLocal, passed) ->
return if passed? && passed.cron # Don't do this stuff on cron
direction = () ->

View file

@ -17,7 +17,7 @@
<p>Authentication isn't yet available (<a href="https://github.com/lefnire/habitrpg#how-do-i-log-in--save-my-data">follow progress here</a>),<br/>
In the meantime a persistent URL can be used accross <br/>
browsers to access your data. Bookmark the following URL.</p>
<input type=text class=input-xlarge value="{_purl}" onClick="$(this).select();"/>
<input id="purl-link" type=text class=input-xlarge value="" />
</div>
</div>
<!--<% if current_user %>-->