Sha256: 2287429c87dbdc540a06a9d8a4fc096c245cc85a94a6cc980a4a041aba77e517
Contents?: true
Size: 1.66 KB
Versions: 6
Compression:
Stored size: 1.66 KB
Contents
<div id='pages-tree'></div> <input type='button' id='new-node' value='<%= I18n.t 'pages.actions.new_page' %>' /> <input type='button' id='new-section' value='<%= I18n.t 'pages.actions.new_section' %>' /> <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(){ jQuery("#pages-tree").pagesTree({ controller : "<%= url_for :controller => params[:controller] %>", translations : <%= I18n.t('pages', :default => {:actions => {}, :alerts => {}}).to_json %> }); jQuery("#page-creation").dialog({ autoOpen : false, modal : true }); jQuery("#new-node").click(function(){ jQuery.tree.focused().create({ data : "page", attributes : {rel : 'page'}}, jQuery.tree.focused().selected || -1); return false; }); jQuery("#new-section").click(function(){ jQuery.tree.focused().create({ data : "section", attributes : {rel : ''}}, jQuery.tree.focused().selected || -1); return false; }); jQuery("#destroy").click(function(){ if (confirm(opts.translations.actions.confirm)) jQuery.tree.focused().remove(); return false; }); }); </script>
Version data entries
6 entries across 6 versions & 1 rubygems