footnote wip: expanding/collapsing footnotes
[fnpeditor.git] / modules / documentCanvas / canvas / widgets.js
index 9563785..cedf16d 100644 (file)
@@ -9,7 +9,28 @@ return {
         return $('<span>')
             .addClass('canvas-widget canvas-widget-label')
             .text(tag + (klass ? ' / ' + klass : ''));
+    },
+
+    footnoteHandler: function(clickHandler) {
+        var mydom = $('<span>')
+            .addClass('canvas-widget canvas-widget-footnote-handle')
+            .css('display', 'inline')
+            .show();
+
+        mydom.click(function() {
+            clickHandler();
+        });
+
+        return mydom;
+    },
+
+    hideButton: function(clickHandler) {
+        var mydom = $('<span>x</span>')
+            .addClass('canvas-widget canvas-widget-hide-button');
+        mydom.click(clickHandler);
+        return mydom;
     }
+
 };
 
 });
\ No newline at end of file