Sha256: 741600af2154eae1ffb1d022dcaaa32d002cdefca9c8248488477f6c21e5fc1a
Contents?: true
Size: 1.38 KB
Versions: 5
Compression:
Stored size: 1.38 KB
Contents
<div id='pages-tree'></div> <input type='button' id='new-node' value='<%= I18n.t 'pages.actions.new_page' %>' /> <input type='button' id='destroy' value='<%= I18n.t 'pages.actions.destroy' %>' /> <form id='page-creation' title='<%= I18n.t 'pages.actions.new_page' %>' style='display:none'> <label for='title'><%= @class.human_attribute_name :title %></label> <input type='text' name='title' id='title' class='text ui-widget-content ui-corner-all' /> <label for='permalink'><%= @class.human_attribute_name :permalink %></label> <input type='text' name='permalink' id='permalink' class='text ui-widget-content ui-corner-all' /> </form> <script type='text/javascript' charset='utf-8'> jQuery(function(){ var translations = <%= I18n.t('pages', :default => {:actions => {}, :alerts => {}}).to_json %> jQuery("#pages-tree").pagesTree({ controller : "<%= url_for :controller => params[:controller] %>", translations : translations }); jQuery("#page-creation").dialog({ autoOpen : false, modal : true }); jQuery("#new-node").click(function(){ jQuery.tree.focused().create({ data : "page"}, jQuery.tree.focused().selected || -1); return false; }); jQuery("#destroy").click(function(){ if (confirm(translations.alerts.confirm)) jQuery.tree.focused().remove(); return false; }); }); </script>
Version data entries
5 entries across 5 versions & 1 rubygems