add a confirm dialog and a busy rotator for delete selected
This commit is contained in:
parent
e9b26ffbb3
commit
6effdd570c
11 changed files with 91 additions and 65 deletions
|
@ -896,7 +896,8 @@ function status_editor($a,$x, $notes_cid = 0, $popup=false) {
|
|||
'$audurl' => t("Please enter an audio link/URL:"),
|
||||
'$term' => t('Tag term:'),
|
||||
'$fileas' => t('Save to Folder:'),
|
||||
'$whereareu' => t('Where are you right now?')
|
||||
'$whereareu' => t('Where are you right now?'),
|
||||
'$delitems' => t('Delete item(s)?')
|
||||
));
|
||||
|
||||
|
||||
|
|
|
@ -3901,10 +3901,10 @@ function drop_item($id,$interactive = true) {
|
|||
|
||||
// send the notification upstream/downstream as the case may be
|
||||
|
||||
proc_run('php',"include/notifier.php","drop","$drop_id");
|
||||
|
||||
if(! $interactive)
|
||||
return $owner;
|
||||
|
||||
proc_run('php',"include/notifier.php","drop","$drop_id");
|
||||
goaway($a->get_baseurl() . '/' . $_SESSION['return_url']);
|
||||
//NOTREACHED
|
||||
}
|
||||
|
|
|
@ -158,21 +158,26 @@ function enableOnUser(){
|
|||
});
|
||||
|
||||
function deleteCheckedItems() {
|
||||
var checkedstr = '';
|
||||
if(confirm('$delitems')) {
|
||||
var checkedstr = '';
|
||||
|
||||
$('.item-select').each( function() {
|
||||
if($(this).is(':checked')) {
|
||||
if(checkedstr.length != 0) {
|
||||
checkedstr = checkedstr + ',' + $(this).val();
|
||||
}
|
||||
else {
|
||||
checkedstr = $(this).val();
|
||||
}
|
||||
}
|
||||
});
|
||||
$.post('item', { dropitems: checkedstr }, function(data) {
|
||||
window.location.reload();
|
||||
});
|
||||
$("#item-delete-selected").hide();
|
||||
$('#item-delete-selected-rotator').show();
|
||||
|
||||
$('.item-select').each( function() {
|
||||
if($(this).is(':checked')) {
|
||||
if(checkedstr.length != 0) {
|
||||
checkedstr = checkedstr + ',' + $(this).val();
|
||||
}
|
||||
else {
|
||||
checkedstr = $(this).val();
|
||||
}
|
||||
}
|
||||
});
|
||||
$.post('item', { dropitems: checkedstr }, function(data) {
|
||||
window.location.reload();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function jotGetLink() {
|
||||
|
|
|
@ -12,5 +12,6 @@
|
|||
window.baseURL = "$baseurl";
|
||||
window.geoTag = function () { $geotag }
|
||||
window.ajaxType = 'jot-header';
|
||||
window.delItems = '$delitems';
|
||||
</script>
|
||||
|
||||
|
|
|
@ -900,22 +900,26 @@ function wallInitEditor() {
|
|||
$j("#prvmail-text").contact_autocomplete(baseurl+"/acl");
|
||||
}
|
||||
|
||||
function deleteCheckedItems() {
|
||||
var checkedstr = '';
|
||||
function deleteCheckedItems(delID) {
|
||||
if(confirm(window.delItems)) {
|
||||
var checkedstr = '';
|
||||
|
||||
$j('.item-select').each( function() {
|
||||
if($j(this).is(':checked')) {
|
||||
if(checkedstr.length != 0) {
|
||||
checkedstr = checkedstr + ',' + $j(this).val();
|
||||
}
|
||||
else {
|
||||
checkedstr = $j(this).val();
|
||||
}
|
||||
}
|
||||
});
|
||||
$j.post('item', { dropitems: checkedstr }, function(data) {
|
||||
window.location.reload();
|
||||
});
|
||||
$j(delID).hide();
|
||||
$j(delID + '-rotator').show();
|
||||
$j('.item-select').each( function() {
|
||||
if($j(this).is(':checked')) {
|
||||
if(checkedstr.length != 0) {
|
||||
checkedstr = checkedstr + ',' + $j(this).val();
|
||||
}
|
||||
else {
|
||||
checkedstr = $j(this).val();
|
||||
}
|
||||
}
|
||||
});
|
||||
$j.post('item', { dropitems: checkedstr }, function(data) {
|
||||
window.location.reload();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
{{ if $dropping }}
|
||||
<div id="item-delete-selected-top" class="fakelink" onclick="deleteCheckedItems();">
|
||||
<div id="item-delete-selected-top" class="fakelink" onclick="deleteCheckedItems('#item-delete-selected-top');">
|
||||
<div id="item-delete-selected-top-icon" class="icon drophide" title="$dropping" onmouseover="imgbright(this);" onmouseout="imgdull(this);" ></div>
|
||||
<div id="item-delete-selected-top-desc" >$dropping</div>
|
||||
</div>
|
||||
<img id="item-delete-selected-top-rotator" class="like-rotator" src="images/rotator.gif" style="display: none;" />
|
||||
{{ endif }}
|
||||
|
||||
$live_update
|
||||
|
@ -14,9 +15,10 @@ $live_update
|
|||
<div id="conversation-end"></div>
|
||||
|
||||
{{ if $dropping }}
|
||||
<div id="item-delete-selected" class="fakelink" onclick="deleteCheckedItems();">
|
||||
<div id="item-delete-selected" class="fakelink" onclick="deleteCheckedItems('#item-delete-selected');">
|
||||
<div id="item-delete-selected-icon" class="icon drophide" title="$dropping" onmouseover="imgbright(this);" onmouseout="imgdull(this);" ></div>
|
||||
<div id="item-delete-selected-desc" >$dropping</div>
|
||||
</div>
|
||||
<img id="item-delete-selected-rotator" class="like-rotator" src="images/rotator.gif" style="display: none;" />
|
||||
<div id="item-delete-selected-end"></div>
|
||||
{{ endif }}
|
||||
|
|
|
@ -17,9 +17,10 @@ $live_update
|
|||
<div id="conversation-end"></div>
|
||||
|
||||
{{ if $dropping }}
|
||||
<a href="#" onclick="deleteCheckedItems();return false;">
|
||||
<a id="item-delete-selected" href="#" onclick="deleteCheckedItems();return false;">
|
||||
<span class="icon s22 delete text">$dropping</span>
|
||||
</a>
|
||||
<img id="item-delete-selected-rotator" class="like-rotator" src="images/rotator.gif" style="display: none;" />
|
||||
{{ endif }}
|
||||
|
||||
<script>
|
||||
|
|
|
@ -194,21 +194,26 @@ function initEditor(cb) {
|
|||
});
|
||||
|
||||
function deleteCheckedItems() {
|
||||
var checkedstr = '';
|
||||
if(confirm('$delitems')) {
|
||||
var checkedstr = '';
|
||||
|
||||
$('.item-select').each( function() {
|
||||
if($(this).is(':checked')) {
|
||||
if(checkedstr.length != 0) {
|
||||
checkedstr = checkedstr + ',' + $(this).val();
|
||||
}
|
||||
else {
|
||||
checkedstr = $(this).val();
|
||||
}
|
||||
}
|
||||
});
|
||||
$.post('item', { dropitems: checkedstr }, function(data) {
|
||||
window.location.reload();
|
||||
});
|
||||
$("#item-delete-selected").hide();
|
||||
$('#item-delete-selected-rotator').show();
|
||||
|
||||
$('.item-select').each( function() {
|
||||
if($(this).is(':checked')) {
|
||||
if(checkedstr.length != 0) {
|
||||
checkedstr = checkedstr + ',' + $(this).val();
|
||||
}
|
||||
else {
|
||||
checkedstr = $(this).val();
|
||||
}
|
||||
}
|
||||
});
|
||||
$.post('item', { dropitems: checkedstr }, function(data) {
|
||||
window.location.reload();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function jotGetLink() {
|
||||
|
@ -356,4 +361,4 @@ function initEditor(cb) {
|
|||
|
||||
$geotag
|
||||
|
||||
</script>
|
||||
</script>
|
||||
|
|
|
@ -195,21 +195,26 @@ function initEditor(cb) {
|
|||
});
|
||||
|
||||
function deleteCheckedItems() {
|
||||
var checkedstr = '';
|
||||
if(confirm('$delitems')) {
|
||||
var checkedstr = '';
|
||||
|
||||
$('.item-select').each( function() {
|
||||
if($(this).is(':checked')) {
|
||||
if(checkedstr.length != 0) {
|
||||
checkedstr = checkedstr + ',' + $(this).val();
|
||||
}
|
||||
else {
|
||||
checkedstr = $(this).val();
|
||||
}
|
||||
}
|
||||
});
|
||||
$.post('item', { dropitems: checkedstr }, function(data) {
|
||||
window.location.reload();
|
||||
});
|
||||
$("#item-delete-selected").hide();
|
||||
$('#item-delete-selected-rotator').show();
|
||||
|
||||
$('.item-select').each( function() {
|
||||
if($(this).is(':checked')) {
|
||||
if(checkedstr.length != 0) {
|
||||
checkedstr = checkedstr + ',' + $(this).val();
|
||||
}
|
||||
else {
|
||||
checkedstr = $(this).val();
|
||||
}
|
||||
}
|
||||
});
|
||||
$.post('item', { dropitems: checkedstr }, function(data) {
|
||||
window.location.reload();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function jotGetLink() {
|
||||
|
|
|
@ -17,9 +17,10 @@ $live_update
|
|||
<div id="conversation-end"></div>
|
||||
|
||||
{{ if $dropping }}
|
||||
<a href="#" onclick="deleteCheckedItems();return false;">
|
||||
<a id="item-delete-selected" href="#" onclick="deleteCheckedItems();return false;">
|
||||
<span class="icon s22 delete text">$dropping</span>
|
||||
</a>
|
||||
<img id="item-delete-selected-rotator" class="like-rotator" src="images/rotator.gif" style="display: none;" />
|
||||
{{ endif }}
|
||||
|
||||
<script>
|
||||
|
|
|
@ -11,5 +11,6 @@ $live_update
|
|||
<div id="item-delete-selected-icon" class="icon drophide" title="$dropping" onmouseover="imgbright(this);" onmouseout="imgdull(this);" ></div>
|
||||
<div id="item-delete-selected-desc" >$dropping</div>
|
||||
</div>
|
||||
<img id="item-delete-selected-rotator" class="like-rotator" src="images/rotator.gif" style="display: none;" />
|
||||
<div id="item-delete-selected-end"></div>
|
||||
{{ endif }}
|
||||
|
|
Loading…
Reference in a new issue