experimental work on draggable pref feed tree
This commit is contained in:
parent
05f224a3d7
commit
2148e0d5cc
|
@ -0,0 +1,16 @@
|
||||||
|
dojo.provide("fox.PrefFeedTree");
|
||||||
|
|
||||||
|
dojo.require("lib.CheckBoxTree");
|
||||||
|
|
||||||
|
dojo.declare("fox.PrefFeedTree", lib.CheckBoxTree, {
|
||||||
|
checkItemAcceptance: function(target, source, position) {
|
||||||
|
var item = dijit.getEnclosingWidget(target).item;
|
||||||
|
|
||||||
|
console.log(source.currentWidget);
|
||||||
|
|
||||||
|
var id = String(item.id);
|
||||||
|
return (id.match("CAT:") || position != "over");
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
|
@ -1046,15 +1046,14 @@
|
||||||
query=\"{id:'root'}\" rootId=\"root\" rootLabel=\"Feeds\"
|
query=\"{id:'root'}\" rootId=\"root\" rootLabel=\"Feeds\"
|
||||||
childrenAttrs=\"items\" checkboxStrict=\"false\" checkboxAll=\"false\">
|
childrenAttrs=\"items\" checkboxStrict=\"false\" checkboxAll=\"false\">
|
||||||
</div>
|
</div>
|
||||||
<div dojoType=\"lib.CheckBoxTree\" id=\"feedTree\" _dndController=\"dijit.tree.dndSource\"
|
<div dojoType=\"fox.PrefFeedTree\" id=\"feedTree\"
|
||||||
|
dndController=\"dijit.tree.dndSource\"
|
||||||
betweenThreshold=\"1\"
|
betweenThreshold=\"1\"
|
||||||
model=\"feedModel\" openOnClick=\"false\">
|
model=\"feedModel\" openOnClick=\"false\">
|
||||||
<script type=\"dojo/method\" event=\"onClick\" args=\"item\">
|
<script type=\"dojo/method\" event=\"onClick\" args=\"item\">
|
||||||
var id = String(item.id);
|
var id = String(item.id);
|
||||||
var bare_id = id.substr(id.indexOf(':')+1);
|
var bare_id = id.substr(id.indexOf(':')+1);
|
||||||
|
|
||||||
console.log('onClick: ' + id);
|
|
||||||
|
|
||||||
if (id.match('FEED')) {
|
if (id.match('FEED')) {
|
||||||
editFeed(bare_id, event);
|
editFeed(bare_id, event);
|
||||||
}
|
}
|
||||||
|
@ -1063,12 +1062,6 @@
|
||||||
<script type=\"dojo/method\" event=\"onLoad\" args=\"item\">
|
<script type=\"dojo/method\" event=\"onLoad\" args=\"item\">
|
||||||
Element.hide(\"feedlistLoading\");
|
Element.hide(\"feedlistLoading\");
|
||||||
</script>
|
</script>
|
||||||
<script type=\"dojo/method\" event=\"checkItemAcceptance\" args=\"item, source, position\">
|
|
||||||
var source_item = dijit.getEnclosingWidget(source);
|
|
||||||
console.log(item);
|
|
||||||
console.log(source_item);
|
|
||||||
</script>
|
|
||||||
|
|
||||||
</div>";
|
</div>";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
2
prefs.js
2
prefs.js
|
@ -1175,8 +1175,10 @@ function init() {
|
||||||
dojo.require("dijit.tree.dndSource");
|
dojo.require("dijit.tree.dndSource");
|
||||||
|
|
||||||
dojo.registerModulePath("lib", "..");
|
dojo.registerModulePath("lib", "..");
|
||||||
|
dojo.registerModulePath("fox", "../..");
|
||||||
|
|
||||||
dojo.require("lib.CheckBoxTree");
|
dojo.require("lib.CheckBoxTree");
|
||||||
|
dojo.require("fox.PrefFeedTree");
|
||||||
|
|
||||||
loading_set_progress(30);
|
loading_set_progress(30);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue