File tree Expand file tree Collapse file tree 4 files changed +75
-1
lines changed
Expand file tree Collapse file tree 4 files changed +75
-1
lines changed Original file line number Diff line number Diff line change 2121# page "/path/to/file.html", :layout => false
2222#
2323# With alternative layout
24- # page "/path/to/file .html", :layout => :otherlayout
24+ page "/debug .html" , :layout => 'debug.haml'
2525#
2626# A path which all have the same layout
2727# with_layout :admin do
Original file line number Diff line number Diff line change 1+ < style media ="screen " type ="text/css ">
2+ .placeholder {
3+ background : # ccff00 ;
4+ padding : 30px 5px ;
5+ clear : both;
6+ }
7+
8+ .layout {
9+ overflow : auto;
10+ }
11+
12+ .layout > .region : nth-child (1 ) {
13+ float : left;
14+ width : 50% ;
15+ }
16+
17+ .layout > .region : nth-child (2 ) {
18+ float : right;
19+ width : 47% ;
20+ }
21+
22+ .part {
23+ clear : both;
24+ background : # ccc ;
25+ padding : 30px 5px ;
26+ margin : 5px ;
27+ }
28+ </ style >
29+
30+ < div data-type ="region " class ="region " id ="root ">
31+ < div data-type ="part " class ="part ">
32+ Part 1
33+ </ div >
34+ < div data-type ="layout " class ="layout ">
35+ < div data-type ="region " class ="region ">
36+ < div data-type ="part " class ="part ">
37+ Part 2
38+ </ div >
39+ </ div >
40+ < div data-type ="region " class ="region ">
41+ < div data-type ="part " class ="part ">
42+ Part 3
43+ </ div >
44+ < div data-type ="part " class ="part ">
45+ Part 4
46+ </ div >
47+ </ div >
48+ </ div >
49+ < div data-type ="part " class ="part ">
50+ Part 5
51+ </ div >
52+ </ div >
Original file line number Diff line number Diff line change 1+ //= require "vendor/jquery"
2+ //= require "jquery-sortable"
3+
4+ $ ( function ( ) {
5+ $ ( '#root.region' ) . sortable ( {
6+ group : 'nested' ,
7+ itemSelector : '.part, .layout' ,
8+ containerSelector : '.region' ,
9+ nested : true ,
10+ placeholder : '<div class="placeholder">Drop here</div>' ,
11+ } ) ;
12+ } )
Original file line number Diff line number Diff line change 1+ !!!
2+ %html
3+ %head
4+ %title jQuery Sortable
5+ %link (rel ="stylesheet" href ="css/vendor.css" )
6+ %link (rel ="stylesheet" href ="css/application.css" )
7+ %body
8+ .bootstrap-container
9+ = yield
10+ %script (src ="js/debug.js" )
You can’t perform that action at this time.
0 commit comments