Olemis Lang avatar Olemis Lang committed 85ae3dc

BH Dashboard #146 : Inplace editor for wiki textarea (bhwiki)

Comments (0)

Files changed (1)

t146/t146_r1386655_bheditable.diff

 
 diff -r c25cea793d1a bhdashboard/htdocs/js/bheditable.js
 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-+++ b/bhdashboard/htdocs/js/bheditable.js	Mon Sep 24 00:28:36 2012 -0500
-@@ -0,0 +1,133 @@
++++ b/bhdashboard/htdocs/js/bheditable.js	Mon Sep 24 01:26:46 2012 -0500
+@@ -0,0 +1,157 @@
 +/*
 +  Licensed to the Apache Software Foundation (ASF) under one
 +  or more contributor license agreements.  See the NOTICE file
 +        }
 +    });
 +
++    // Basic wiki editor requires Trac's wikitoolbar.js
++
++  $.editable.addInputType('bhwiki', 
++    {
++      element : function(settings, original) {
++          var textarea = $('<textarea />').addClass('wikitext trac-resizable');
++          var iefix = $('<fieldset />').addClass('iefix');
++          if (settings.rows) {
++              textarea.attr('rows', settings.rows);
++          } else if (settings.height != "none") {
++              textarea.height(settings.height);
++          }
++          if (settings.cols) {
++              textarea.attr('cols', settings.cols);
++          } else if (settings.width != "none") {
++              textarea.width(settings.width);
++          }
++          iefix.append(textarea);
++          addWikiFormattingToolbar(textarea.get(0));
++          $(this).append(iefix);
++          return(textarea);
++        }
++    });
++
 + /* BLODDHOUND EDITABLE DATA-API
 +  * ============================ */
 +
 +
 diff -r c25cea793d1a bhdashboard/htdocs/js/jquery.json.js
 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-+++ b/bhdashboard/htdocs/js/jquery.json.js	Mon Sep 24 00:28:36 2012 -0500
++++ b/bhdashboard/htdocs/js/jquery.json.js	Mon Sep 24 01:26:46 2012 -0500
 @@ -0,0 +1,23 @@
 +
 +(function($){var escapeable=/["\\\x00-\x1f\x7f-\x9f]/g,meta={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'};$.toJSON=typeof JSON==='object'&&JSON.stringify?JSON.stringify:function(o){if(o===null){return'null';}
 \ No newline at end of file
 diff -r c25cea793d1a bhdashboard/util.py
 --- a/bhdashboard/util.py	Sun Sep 23 13:33:21 2012 -0500
-+++ b/bhdashboard/util.py	Mon Sep 24 00:28:36 2012 -0500
++++ b/bhdashboard/util.py	Mon Sep 24 01:26:46 2012 -0500
 @@ -176,6 +176,17 @@
      )
  
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.