--- /dev/null
+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;
+ },
+});
+
query=\"{id:'root'}\" rootId=\"root\" rootLabel=\"Feeds\"
childrenAttrs=\"items\" checkboxStrict=\"false\" checkboxAll=\"false\">
</div>
- <div dojoType=\"lib.CheckBoxTree\" id=\"feedTree\" _dndController=\"dijit.tree.dndSource\"
+ <div dojoType=\"fox.PrefFeedTree\" id=\"feedTree\"
+ dndController=\"dijit.tree.dndSource\"
betweenThreshold=\"1\"
model=\"feedModel\" openOnClick=\"false\">
<script type=\"dojo/method\" event=\"onClick\" args=\"item\">
var id = String(item.id);
var bare_id = id.substr(id.indexOf(':')+1);
- console.log('onClick: ' + id);
-
if (id.match('FEED')) {
editFeed(bare_id, event);
}
<script type=\"dojo/method\" event=\"onLoad\" args=\"item\">
Element.hide(\"feedlistLoading\");
</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>";
/*
dojo.require("dijit.tree.dndSource");
dojo.registerModulePath("lib", "..");
+ dojo.registerModulePath("fox", "../..");
dojo.require("lib.CheckBoxTree");
+ dojo.require("fox.PrefFeedTree");
loading_set_progress(30);