lib/patricia/assets/javascripts/app.js in patricia-0.0.1 vs lib/patricia/assets/javascripts/app.js in patricia-0.1.1

- old
+ new

@@ -1,23 +1,22 @@ $(document).ready(function() { + var self = $(this); + // Helpers $.fn.elementText = function() { - var str = ''; - $(this).contents().each(function() { - if ($(this).nodeType == 3) { - str += $(this).textContent || $(this).innerText || ''; - } - }); - return str; + return $(this).clone().children().remove().end().text(); }; + // Aesthetical enhancements + $('table').addClass('table table-striped table-responsive') + + // Sidebar expanding - var self = $(this); self.sidebarExpanded = false; self.originalSidebarStyle = { 'width': '', 'position': '', 'box-shadow': '', @@ -80,10 +79,15 @@ <p><code>?</code><span>: Toggle key bindings help</span></p>\ <p><code>w</code><span>: Toggle sidebar width</span></p>\ <p><code>s</code><span>: Select sidebar search box</span></p>\ <p><code>Esc</code><span>: Unselect sidebar search box</span></p>\ <p><code>p</code><span>: Go to page search page</span></p>\ +<p><code>e</code><span>: Edit selected text</span></p>\ +<strong>Editor textarea:</strong>\ +<p><code>Ctrl</code> + <code>RET</code><span>: Save changes \ +<p><code>Alt</code> + <code>p</code><span>: Go to previous match \ +<p><code>Alt</code> + <code>n</code><span>: Go to next match \ </div>\ ' ); self.helpBox = $('#help-box'); self.helpBox.hide(); @@ -92,10 +96,10 @@ 'background-color': '#FAFAFA', 'color': '#686868', 'top': '50%', 'left': '50%', 'width': '500px', - 'height': '400px', + 'height': '430px', 'margin-left': '-200px', 'margin-top': '-300px', 'z-index': '9999', 'padding': '10px', 'box-shadow': '0 0 0 9999px rgba(0, 0, 0, 0.2)',