public
Fork of halorgium/mephisto
Description: A mirror of the mephisto code-base
Homepage: http://mephistoblog.com/
Clone URL: git://github.com/technoweenie/mephisto.git
Click here to lend your support to: mephisto and make a donation at www.pledgie.com !
hide sortable icons from sections unless sorting

git-svn-id: http://svn.techno-weenie.net/projects/mephisto/trunk@2301 
567b1171-46fb-0310-a4c9-b4bef9110e78
technoweenie (author)
Sat Sep 30 19:10:42 -0700 2006
commit  db409898ec6b633c1f429a1aca1714b50a3ec955
tree    3afef008528e50b7d962f154c280ff4ad430dda3
parent  32bd0497f7a8a5a37e6da17eb6583ee57e753276
...
1
2
 
3
4
5
...
1
 
2
3
4
5
0
@@ -1,4 +1,4 @@
0
 <li id="page-<%= page.id %>">
0
- <%= image_tag('/images/mephisto/icons/arrow3_e.gif', :class => 'iconb orange handle') %>
0
+ <span class="iconb orange handle">&nbsp;</span>
0
   <%= link_to page.title, :controller => 'articles', :action => 'edit', :id => page %>
0
 </li>
0
\ No newline at end of file
...
1
2
3
 
 
4
5
6
...
1
 
 
2
3
4
5
6
0
@@ -1,6 +1,6 @@
0
 <li id="<%= section.dom_id %>">
0
- <%= image_tag('/images/mephisto/icons/arrow3_e.gif', :class => 'iconb orange handle') %>
0
- <%= link_to_remote image_tag('/images/mephisto/icons/trash.gif', :class => 'iconb red'), {
0
+ <span class="iconb orange handle">&nbsp;</span>
0
+ <%= link_to_remote image_tag('/images/mephisto/icons/trash.gif', :class => 'iconb red trash'), {
0
         :url => { :controller => 'sections', :action => 'destroy', :id => section },
0
         :confirm => "Are you sure?"},
0
         :class => 'aicon' unless section.home? %>
...
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
...
334
335
336
 
 
 
337
338
339
340
 
 
 
341
342
343
0
@@ -334,16 +334,10 @@ var SectionForm = {
0
       $(container_id).className = '';
0
       link.innerHTML = 'Reorder ' + container_id;
0
       link.className = 'reorder';
0
- document.getElementsByClassName('handle', container_id).each(function(img) {
0
- img.src = "/images/mephisto/icons/arrow3_e.gif";
0
- });
0
       this.saveSortable(section_id, container_id);
0
     } else {
0
       this.sortable = Sortable.create(container_id, {handle:'handle'});
0
       $(container_id).className = 'sortable';
0
- document.getElementsByClassName('handle', container_id).each(function(img) {
0
- img.src = "/images/mephisto/icons/reorder.gif";
0
- });
0
       link.className = 'reordering';
0
       link.innerHTML = 'Done Reordering'
0
     }
...
546
547
548
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
549
550
551
...
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
0
@@ -546,6 +546,23 @@ input[type='text']:focus, textarea:focus {
0
   margin-right: 10px;
0
 }
0
 
0
+ul .handle {
0
+ width:16px;
0
+ line-height:16px;
0
+ margin:2px 14px 2px 0;
0
+ display:block;
0
+ float:left;
0
+ background-image: url(/images/mephisto/icons/arrow3_e.gif);
0
+}
0
+
0
+.sortable .handle {
0
+ background-image: url(/images/mephisto/icons/reorder.gif);
0
+}
0
+
0
+#sections .handle { display:none; }
0
+#sections.sortable .handle { display:block; }
0
+#sections.sortable .trash { display:none; }
0
+
0
 a#section-home {
0
   margin-left: 29px;
0
 }

Comments

    No one has commented yet.