checkItemAcceptance: function(target, source, position) {
var item = dijit.getEnclosingWidget(target).item;
- console.log(source.currentWidget);
-
+ // disable copying items
+ source.copyState = function() { return false; }
+
+ var source_item = false;
+
+ source.forInSelectedItems(function(node) {
+ source_item = node.data.item;
+ });
+
+ if (!source_item || !item) return false;
+
var id = String(item.id);
- return (id.match("CAT:") || position != "over");
- return true;
+ var source_id = String(source_item.id);
+
+ var id = this.tree.model.store.getValue(item, 'id');
+ var source_id = source.tree.model.store.getValue(source_item, 'id');
+
+ //console.log(id + " " + position + " " + source_id);
+
+ if (source_id.match("FEED:")) {
+ return ((id.match("CAT:") && position == "over") ||
+ (id.match("FEED:") && position != "over"));
+ } else if (source_id.match("CAT:")) {
+ return ((id.match("CAT:") && position != "over") ||
+ (id.match("root") && position == "over"));
+ }
},
});
// | var currState = model.getCheckboxState(item);
//
var currState = undefined;
-
+
// Special handling required for the 'fake' root entry (the root is NOT a dojo.data.item).
- if ( storeItem == this.root ) {
+ // this stuff is only relevant for Forest store -fox
+/* if ( storeItem == this.root ) {
if( typeof(storeItem.checkbox) == "undefined" ) {
this.root.checkbox = undefined; // create a new checbox reference as undefined.
if( this.checkboxRoot ) {
this._setCheckboxState( storeItem, this.checkboxState );
currState = this.checkboxState;
}
+ } */
+
+ currState = this.store.getValue(storeItem, this.checkboxIdent);
+ if( currState == undefined && this.checkboxAll) {
+ this._setCheckboxState( storeItem, this.checkboxState );
+ currState = this.checkboxState;
}
+
return currState // the current state of the checkbox (true/false or undefined)
},
if ($num_errors > 0) {
- print format_notice("<a href=\"javascript:showFeedsWithErrors()\">".
- __('Some feeds have update errors (click for details)')."</a>");
+ $error_button = "<button dojoType=\"dijit.form.Button\"
+ onclick=\"showFeedsWithErrors\" id=\"errorButton\">" .
+ __("Feeds with errors") . "</button>";
+
+// print format_notice("<a href=\"javascript:showFeedsWithErrors()\">".
+// __('Some feeds have update errors (click for details)')."</a>");
}
$feed_search = db_escape_string($_REQUEST["search"]);
__('Edit categories')."</button dojoType=\"dijit.form.Button\"> ";
}
+ print $error_button;
+
print "<button dojoType=\"dijit.form.Button\" onclick=\"removeSelectedFeeds()\">"
.__('Unsubscribe')."</button dojoType=\"dijit.form.Button\"> ";
try {
if (!event || !event.ctrlKey) {
- disableHotkeys();
-
notify_progress("Loading, please wait...");
selectTableRows('prefUserList', 'none');
if (!event || !event.ctrlKey) {
- disableHotkeys();
-
notify_progress("Loading, please wait...");
selectTableRows('prefFilterList', 'none');
if (event && !event.ctrlKey) {
- disableHotkeys();
-
notify_progress("Loading, please wait...");
// selectTableRows('prefFeedList', 'none');
notify("");
- disableHotkeys();
-
notify_progress("Loading, please wait...");
var query = "?op=pref-feeds&subop=editfeeds&ids=" +
}
if (keycode == 16) return; // ignore lone shift
+ if (keycode == 17) return; // ignore lone ctrl
if ((keycode == 67 || keycode == 71) && !hotkey_prefix) {
hotkey_prefix = keycode;
border-width : 0px;
}
-
+#errorButton {
+ color : red;
+}