|
42 | 42 |
|
43 | 43 | %div.group.form{:style => "position:relative;"} |
44 | 44 | %label.label Attributes |
45 | | - //%div.editor |
46 | | - // %div#tree |
47 | | - // %div#jform |
48 | | - // %div.clear |
49 | | - // %script= "$(document).ready(function() { JSONeditor.start('tree', 'jform', #{@node.attribute.to_json}, false); });" |
50 | | - %script= "$(document).ready(function() { $$(\"jsonstr\").value = JSON.stringify(#{@node.attribute.to_json}); if (BCJTEP.build()) { $$(\"results\").innerHTML = \" \"; $$(\"editortab\").className = \"show\"; $$(\"searchtab\").className = \"show\"; }});" |
51 | | - %div#treecontainer |
52 | | - %div#div1 |
53 | | - %div#tabcontainer |
54 | | - %div#tab-container-1.tablayout |
55 | | - %ul#tab-container-1-nav.tablayout |
56 | | - %li |
57 | | - %a{ :href => "#tab1"} source |
58 | | - %li#editortab.noshow |
59 | | - %a{ :href => "#tab2"} editor |
60 | | - %li#searchtab.noshow |
61 | | - %a{ :href => "#tab3"} search |
62 | | - %div#tab1.tab |
63 | | - %div#tab-container-2.tablayout.nested |
64 | | - %ul#tab-container-2-nav.tablayout |
65 | | - %li |
66 | | - %a{ :href => "#tab1a" } json |
67 | | - %div#tab1a.tabn |
68 | | - %table.icanhastable |
69 | | - %tr |
70 | | - %td |
71 | | - %div#refresh.button{:title => "Reload JSON from Tree"} |
72 | | - %div#buildbutton.button{:title => "Load JSON from Source"} |
73 | | - %tr |
74 | | - %td |
75 | | - %textarea#jsonstr{:wrap => "virtual", :cols => "55", :rows => "10", :class => ""} |
76 | | - %div#tab2.tab |
77 | | - %table.icanhastable |
78 | | - %tr |
79 | | - %td |
80 | | - %div#add.button{:title => "Add a new attribute"} |
81 | | - %div#delete.button{:title => "Delete current attribute"} |
82 | | - %div#savedstatus{:style => "display:none;"} |
83 | | - %img{ :src=> "/images/jsonedit/saved.png"} |
84 | | - %span Saved! |
85 | | - %div#deletedstatus{:style => "display:none;"} |
86 | | - %img{ :src=> "/images/jsonedit/deleted.png"} |
87 | | - %span Deleted! |
88 | | - %td |
89 | | - type : |
90 | | - %select#jsontypes |
91 | | - %option Select Type |
92 | | - %tr |
93 | | - %td{:colspan => "2"} |
94 | | - %div#jsonnameinput |
95 | | - name : |
96 | | - %input#jsonname{:type => "text", :size=>"55", :class => ""} |
97 | | - %tr |
98 | | - %td{:colspan => "2"} |
99 | | - %textarea#jsonvalue{:wrap => "virtual", :cols => "55", :rows => "5", :class => ""} |
100 | | - %div#jsonpath |
101 | | - %tr |
102 | | - %td{:style => "text-align:left !important"} |
103 | | - %input#autodetect{:type => "checkbox", :checked=> "true"} |
104 | | - %label{:for => "autodetect"} Autodetect type of attribute? |
105 | | - %td |
106 | | - %input#savebutton{:type => "button", :value => "Save Attribute"} |
107 | | - %input#addbutton{:type => "button", :value => "Add Attribute"} |
108 | | - %div#tab3.tab |
109 | | - %table.icanhastable |
110 | | - %tr |
111 | | - %td |
112 | | - %span search : |
113 | | - %input#keyword{:type => "text"} |
114 | | - %input#search{:type => "button", :value => "Find"} |
115 | | - %tr |
116 | | - %td |
117 | | - %div#results |
118 | | - %div#console |
119 | | - %div#bar |
120 | | - %a#consolebar Error Console |
121 | | - %div#log |
122 | | - |
| 45 | + = partial '../layout/jsonedit', :json =>@node.attribute.to_json |
123 | 46 | %div.group.form |
124 | | - %label.label Actions |
125 | 47 | %span.description A JSON hash for default attributes for nodes of this node. These attributes will only be applied if the node does not already have a value for the attributes. |
126 | 48 |
|
127 | 49 | = form(:action => form_url, :method => :post, :id => form_id, :class => 'form') do |
|
0 commit comments