Changeset 1105
- Timestamp:
- 04/30/10 14:14:49 (22 months ago)
- Location:
- plugins/apostrophePlugin/trunk
- Files:
-
- 3 modified
-
modules/a/templates/_historyBrowser.php (modified) (2 diffs)
-
modules/a/templates/historySuccess.php (modified) (3 diffs)
-
web/css/a.css (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
plugins/apostrophePlugin/trunk/modules/a/templates/_historyBrowser.php
r1045 r1105 14 14 </tr> 15 15 </thead> 16 <tfoot> 17 <?php if (1): ?> 18 <tr> 19 <td colspan="3"> 20 <a href="#" class="a-history-browser-view-more"><?php echo __('View More Revisions', null, 'apostrophe') ?> <img src="/apostrophePlugin/images/a-icon-loader.gif" class="spinner" /></a> 21 </td> 22 <td class="number-of-revisions"></td> 23 </tr> 24 <?php endif ?> 25 </tfoot> 26 <tbody class="a-history-items"> <?php // this replaces the history container, we want to return a list of populated rows <TR></TR> ?> 16 <tbody class="a-history-items"> 27 17 <tr class="a-history-item"> 28 18 <td class="date"><img src="/apostrophePlugin/images/a-icon-loader.gif"></td> … … 31 21 </tr> 32 22 </tbody> 23 <tfoot> 24 <tr> 25 <td colspan="3"> 26 <a href="#" class="a-history-browser-view-more" id="a-history-browser-view-more"><?php echo __('View More Revisions', null, 'apostrophe') ?> <img src="/apostrophePlugin/images/a-icon-loader.gif" class="spinner" /></a> 27 </td> 28 <td class="number-of-revisions"></td> 29 </tr> 30 </tfoot> 33 31 </table> 34 32 </div> -
plugins/apostrophePlugin/trunk/modules/a/templates/historySuccess.php
r1040 r1105 66 66 <script type="text/javascript" charset="utf-8"> 67 67 $(function() { 68 $(' .a-history-browser .a-history-browser-view-more').show();68 $('#a-history-browser-view-more').show(); 69 69 }); 70 70 </script> … … 72 72 <script type="text/javascript" charset="utf-8"> 73 73 $(function() { 74 $(' .a-history-browser .a-history-browser-view-more').hide();74 $('#a-history-browser-view-more').hide().before(' '); 75 75 }); 76 76 </script> … … 79 79 80 80 <script type="text/javascript" charset="utf-8"> 81 $(document).ready(function() { 81 82 82 // Stuff to do as soon as the DOM is ready; 83 $('.a-history-browser-view-more').mousedown(function(){ 84 $(this).children('img').fadeIn('fast'); 85 }) 83 $('.a-history-browser-view-more').mousedown(function(){ 84 $(this).children('img').fadeIn('fast'); 85 }) 86 86 87 $('.a-history-item').click(function() {87 $('.a-history-item').click(function() { 88 88 89 $('.a-history-browser').hide();89 $('.a-history-browser').hide(); 90 90 91 var params = $(this).data('params');91 var params = $(this).data('params'); 92 92 93 var targetArea = "#"+$(this).parent().attr('rel'); // this finds the associated area that the history browser is displaying94 var historyBtn = $(targetArea+ ' .a-area-controls a.a-history'); // this grabs the history button95 var cancelBtn = $('#a-history-cancel-button'); // this grabs the cancel button for this area96 var revertBtn = $('#a-history-revert-button'); // this grabs the history revert button for this area93 var targetArea = "#"+$(this).parent().attr('rel'); <?php // this finds the associated area that the history browser is displaying ?> 94 var historyBtn = $(targetArea+ ' .a-area-controls a.a-history'); <?php // this grabs the history button ?> 95 var cancelBtn = $('#a-history-cancel-button'); <?php // this grabs the cancel button for this area ?> 96 var revertBtn = $('#a-history-revert-button'); <?php // this grabs the history revert button for this area ?> 97 97 98 $(historyBtn).siblings('.a-history-options').show();98 $(historyBtn).siblings('.a-history-options').show(); 99 99 100 $.post( //User clicks to PREVIEW revision 101 <?php echo json_encode(url_for('a/revert')) ?>, 102 params.preview, 103 function(result) 104 { 105 $('#a-slots-<?php echo "$id-$name" ?>').html(result); 106 $(targetArea).addClass('previewing-history'); 107 historyBtn.addClass('a-disabled'); 108 // $(targetArea+' .a-controls-item').siblings('.cancel, .history').css('display', 'block'); // turn off all controls initially 109 // $(targetArea+' .a-controls-item.cancel').addClass('cancel-history'); 110 // $(targetArea+' .a-history-options').css('display','inline'); 111 $('.a-page-overlay').hide(); 112 aUI(targetArea); 113 } 114 ); 115 116 // Assign behaviors to the revert and cancel buttons when THIS history item is clicked 117 revertBtn.click(function(){ 118 $.post( // User clicks Save As Current Revision Button 100 $.post( //User clicks to PREVIEW revision 119 101 <?php echo json_encode(url_for('a/revert')) ?>, 120 params. revert,102 params.preview, 121 103 function(result) 122 104 { 123 $('#a-slots-<?php echo "$id-$name" ?>').html(result); 124 historyBtn.removeClass('a-disabled'); 125 aCloseHistory(); 126 aUI(targetArea, 'history-revert'); 127 } 128 ); 105 $('#a-slots-<?php echo "$id-$name" ?>').html(result); 106 $(targetArea).addClass('previewing-history'); 107 historyBtn.addClass('a-disabled'); 108 $('.a-page-overlay').hide(); 109 aUI(targetArea); 110 } 111 ); 112 113 // Assign behaviors to the revert and cancel buttons when THIS history item is clicked 114 revertBtn.click(function(){ 115 $.post( // User clicks Save As Current Revision Button 116 <?php echo json_encode(url_for('a/revert')) ?>, 117 params.revert, 118 function(result) 119 { 120 $('#a-slots-<?php echo "$id-$name" ?>').html(result); 121 historyBtn.removeClass('a-disabled'); 122 aCloseHistory(); 123 aUI(targetArea, 'history-revert'); 124 } 125 ); 126 }); 127 128 cancelBtn.click(function(){ 129 $.post( // User clicks CANCEL 130 <?php echo json_encode(url_for('a/revert')) ?>, 131 params.cancel, 132 function(result) 133 { 134 $('#a-slots-<?php echo "$id-$name" ?>').html(result); 135 historyBtn.removeClass('a-disabled'); 136 aCloseHistory(); 137 aUI(targetArea); 138 } 139 ); 140 }); 129 141 }); 130 131 cancelBtn.click(function(){ 132 $.post( // User clicks CANCEL 133 <?php echo json_encode(url_for('a/revert')) ?>, 134 params.cancel, 135 function(result) 136 { 137 $('#a-slots-<?php echo "$id-$name" ?>').html(result); 138 historyBtn.removeClass('a-disabled'); 139 aCloseHistory(); 140 aUI(targetArea); 141 } 142 ); 142 143 $('.a-history-item').hover(function(){ 144 $(this).css('cursor','pointer'); 145 },function(){ 146 $(this).css('cursor','default'); 143 147 }); 144 });145 148 146 $('.a-history-item').hover(function(){ 147 $(this).css('cursor','pointer'); 148 },function(){ 149 $(this).css('cursor','default'); 150 }); 151 149 }); 152 150 </script> -
plugins/apostrophePlugin/trunk/web/css/a.css
r1099 r1105 1737 1737 float: left; 1738 1738 visibility: hidden; 1739 position: relative; 1739 1740 margin: 0 !important; 1740 1741 padding: 0 !important; … … 2677 2678 { 2678 2679 border-top: 1px solid #ddd; 2679 /* padding: 8px 4px;*/ 2680 padding: 8px 4px; 2680 2681 } 2681 2682

