Rename dopin() to doPIn
This commit is contained in:
parent
9885c1f128
commit
b3b2bc96ba
|
@ -701,21 +701,26 @@ function dostar(ident) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function dopin(ident) {
|
function doPin(ident) {
|
||||||
ident = ident.toString();
|
ident = ident.toString();
|
||||||
$('#like-rotator-' + ident).show();
|
$('#like-rotator-' + ident).show();
|
||||||
$.get('pinned/' + ident, function(data) {
|
$.get('pinned/' + ident)
|
||||||
|
.then(function(data) {
|
||||||
if (data.match(/1/)) {
|
if (data.match(/1/)) {
|
||||||
$('#pinned-' + ident).addClass('pinned');
|
$('#pinned-' + ident)
|
||||||
$('#pinned-' + ident).removeClass('unpinned');
|
.addClass('pinned')
|
||||||
|
.removeClass('unpinned');
|
||||||
$('#pin-' + ident).addClass('hidden');
|
$('#pin-' + ident).addClass('hidden');
|
||||||
$('#unpin-' + ident).removeClass('hidden');
|
$('#unpin-' + ident).removeClass('hidden');
|
||||||
} else {
|
} else {
|
||||||
$('#pinned-' + ident).addClass('unpinned');
|
$('#pinned-' + ident)
|
||||||
$('#pinned-' + ident).removeClass('pinned');
|
.addClass('unpinned')
|
||||||
|
.removeClass('pinned');
|
||||||
$('#pin-' + ident).removeClass('hidden');
|
$('#pin-' + ident).removeClass('hidden');
|
||||||
$('#unpin-' + ident).addClass('hidden');
|
$('#unpin-' + ident).addClass('hidden');
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
.always(function () {
|
||||||
$('#like-rotator-' + ident).hide();
|
$('#like-rotator-' + ident).hide();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -102,7 +102,7 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{if $item.pin}}
|
{{if $item.pin}}
|
||||||
<a href="#" id="pinned-{{$item.id}}" onclick="dopin({{$item.id}}); return false;" class="pin-item icon {{$item.ispinned}}" title="{{$item.pin.toggle}}"></a>
|
<a href="#" id="pinned-{{$item.id}}" onclick="doPin({{$item.id}}); return false;" class="pin-item icon {{$item.ispinned}}" title="{{$item.pin.toggle}}"></a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{if $item.star}}
|
{{if $item.star}}
|
||||||
<a href="#" id="starred-{{$item.id}}" onclick="dostar({{$item.id}}); return false;" class="star-item icon {{$item.isstarred}}" title="{{$item.star.toggle}}"></a>
|
<a href="#" id="starred-{{$item.id}}" onclick="dostar({{$item.id}}); return false;" class="star-item icon {{$item.isstarred}}" title="{{$item.star.toggle}}"></a>
|
||||||
|
|
|
@ -199,8 +199,8 @@
|
||||||
|
|
||||||
{{if $item.pin}}
|
{{if $item.pin}}
|
||||||
<li role="menuitem">
|
<li role="menuitem">
|
||||||
<a id="pin-{{$item.id}}" href="javascript:dopin({{$item.id}});" class="btn-link {{$item.pin.classdo}}" title="{{$item.pin.do}}"><i class="fa fa-circle-o" aria-hidden="true"></i> {{$item.pin.do}}</a>
|
<a id="pin-{{$item.id}}" href="javascript:doPin({{$item.id}});" class="btn-link {{$item.pin.classdo}}" title="{{$item.pin.do}}"><i class="fa fa-circle-o" aria-hidden="true"></i> {{$item.pin.do}}</a>
|
||||||
<a id="unpin-{{$item.id}}" href="javascript:dopin({{$item.id}});" class="btn-link {{$item.pin.classundo}}" title="{{$item.pin.undo}}"><i class="fa fa-dot-circle-o" aria-hidden="true"></i> {{$item.pin.undo}}</a>
|
<a id="unpin-{{$item.id}}" href="javascript:doPin({{$item.id}});" class="btn-link {{$item.pin.classundo}}" title="{{$item.pin.undo}}"><i class="fa fa-dot-circle-o" aria-hidden="true"></i> {{$item.pin.undo}}</a>
|
||||||
</li>
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
|
|
@ -351,8 +351,8 @@ as the value of $top_child_total (this is done at the end of this file)
|
||||||
|
|
||||||
{{if $item.pin}}
|
{{if $item.pin}}
|
||||||
<li role="menuitem">
|
<li role="menuitem">
|
||||||
<a id="pin-{{$item.id}}" href="javascript:dopin({{$item.id}});" class="btn-link {{$item.pin.classdo}}" title="{{$item.pin.do}}"><i class="fa fa-circle-o" aria-hidden="true"></i> {{$item.pin.do}}</a>
|
<a id="pin-{{$item.id}}" href="javascript:doPin({{$item.id}});" class="btn-link {{$item.pin.classdo}}" title="{{$item.pin.do}}"><i class="fa fa-circle-o" aria-hidden="true"></i> {{$item.pin.do}}</a>
|
||||||
<a id="unpin-{{$item.id}}" href="javascript:dopin({{$item.id}});" class="btn-link {{$item.pin.classundo}}" title="{{$item.pin.undo}}"><i class="fa fa-dot-circle-o" aria-hidden="true"></i> {{$item.pin.undo}}</a>
|
<a id="unpin-{{$item.id}}" href="javascript:doPin({{$item.id}});" class="btn-link {{$item.pin.classundo}}" title="{{$item.pin.undo}}"><i class="fa fa-dot-circle-o" aria-hidden="true"></i> {{$item.pin.undo}}</a>
|
||||||
</li>
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
@ -516,8 +516,8 @@ as the value of $top_child_total (this is done at the end of this file)
|
||||||
|
|
||||||
{{if $item.pin}}
|
{{if $item.pin}}
|
||||||
<li role="menuitem">
|
<li role="menuitem">
|
||||||
<a id="pin-{{$item.id}}" href="javascript:dopin({{$item.id}});" class="btn-link {{$item.pin.classdo}}" title="{{$item.pin.do}}"><i class="fa fa-circle-o" aria-hidden="true"></i> {{$item.pin.do}}</a>
|
<a id="pin-{{$item.id}}" href="javascript:doPin({{$item.id}});" class="btn-link {{$item.pin.classdo}}" title="{{$item.pin.do}}"><i class="fa fa-circle-o" aria-hidden="true"></i> {{$item.pin.do}}</a>
|
||||||
<a id="unpin-{{$item.id}}" href="javascript:dopin({{$item.id}});" class="btn-link {{$item.pin.classundo}}" title="{{$item.pin.undo}}"><i class="fa fa-dot-circle-o" aria-hidden="true"></i> {{$item.pin.undo}}</a>
|
<a id="unpin-{{$item.id}}" href="javascript:doPin({{$item.id}});" class="btn-link {{$item.pin.classundo}}" title="{{$item.pin.undo}}"><i class="fa fa-dot-circle-o" aria-hidden="true"></i> {{$item.pin.undo}}</a>
|
||||||
</li>
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
|
|
@ -98,8 +98,8 @@
|
||||||
|
|
||||||
<div class="wall-item-actions-social">
|
<div class="wall-item-actions-social">
|
||||||
{{if $item.pin}}
|
{{if $item.pin}}
|
||||||
<a href="#" id="pin-{{$item.id}}" onclick="dopin({{$item.id}}); return false;" class="{{$item.pin.classdo}}" title="{{$item.pin.do}}">{{$item.pin.do}}</a>
|
<a href="#" id="pin-{{$item.id}}" onclick="doPin({{$item.id}}); return false;" class="{{$item.pin.classdo}}" title="{{$item.pin.do}}">{{$item.pin.do}}</a>
|
||||||
<a href="#" id="unpin-{{$item.id}}" onclick="dopin({{$item.id}}); return false;" class="{{$item.pin.classundo}}" title="{{$item.pin.undo}}">{{$item.pin.undo}}</a>
|
<a href="#" id="unpin-{{$item.id}}" onclick="doPin({{$item.id}}); return false;" class="{{$item.pin.classundo}}" title="{{$item.pin.undo}}">{{$item.pin.undo}}</a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{if $item.star}}
|
{{if $item.star}}
|
||||||
<a href="#" id="star-{{$item.id}}" onclick="dostar({{$item.id}}); return false;" class="{{$item.star.classdo}}" title="{{$item.star.do}}">{{$item.star.do}}</a>
|
<a href="#" id="star-{{$item.id}}" onclick="dostar({{$item.id}}); return false;" class="{{$item.star.classdo}}" title="{{$item.star.do}}">{{$item.star.do}}</a>
|
||||||
|
|
|
@ -114,7 +114,7 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{if $item.pin}}
|
{{if $item.pin}}
|
||||||
<a href="#" id="pinned-{{$item.id}}" onclick="dopin({{$item.id}}); return false;" class="pin-item icon {{$item.ispinned}}" title="{{$item.pin.toggle}}"></a>
|
<a href="#" id="pinned-{{$item.id}}" onclick="doPin({{$item.id}}); return false;" class="pin-item icon {{$item.ispinned}}" title="{{$item.pin.toggle}}"></a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{if $item.star}}
|
{{if $item.star}}
|
||||||
<a href="#" id="starred-{{$item.id}}" onclick="dostar({{$item.id}}); return false;" class="star-item icon {{$item.isstarred}}" title="{{$item.star.toggle}}"></a>
|
<a href="#" id="starred-{{$item.id}}" onclick="dostar({{$item.id}}); return false;" class="star-item icon {{$item.isstarred}}" title="{{$item.star.toggle}}"></a>
|
||||||
|
|
|
@ -136,8 +136,8 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{if $item.pin}}
|
{{if $item.pin}}
|
||||||
<a role="button" id="pin-{{$item.id}}" onclick="dopin({{$item.id}}); return false;" class="{{$item.pin.classdo}}" title="{{$item.pin.do}}"><i class="icon-circle icon-large"><span class="sr-only">{{$item.pin.do}}</span></i></a>
|
<a role="button" id="pin-{{$item.id}}" onclick="doPin({{$item.id}}); return false;" class="{{$item.pin.classdo}}" title="{{$item.pin.do}}"><i class="icon-circle icon-large"><span class="sr-only">{{$item.pin.do}}</span></i></a>
|
||||||
<a role="button" id="unpin-{{$item.id}}" onclick="dopin({{$item.id}}); return false;" class="{{$item.pin.classundo}}" title="{{$item.pin.undo}}"><i class="icon-remove-circle icon-large"><span class="sr-only">{{$item.pin.undo}}</span></i></a>
|
<a role="button" id="unpin-{{$item.id}}" onclick="doPin({{$item.id}}); return false;" class="{{$item.pin.classundo}}" title="{{$item.pin.undo}}"><i class="icon-remove-circle icon-large"><span class="sr-only">{{$item.pin.undo}}</span></i></a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{if $item.star}}
|
{{if $item.star}}
|
||||||
<a role="button" id="star-{{$item.id}}" onclick="dostar({{$item.id}}); return false;" class="{{$item.star.classdo}}" title="{{$item.star.do}}"><i class="icon-star icon-large"><span class="sr-only">{{$item.star.do}}</span></i></a>
|
<a role="button" id="star-{{$item.id}}" onclick="dostar({{$item.id}}); return false;" class="{{$item.star.classdo}}" title="{{$item.star.do}}"><i class="icon-star icon-large"><span class="sr-only">{{$item.star.do}}</span></i></a>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user