Skip to content
This repository
Browse code

MINOR Renamed .ss-tabset to .cms-tabset in cms templates to distingui…

…sh entwine selectors and add extra functionality (cookies, re-selecting tab, panel loading)
  • Loading branch information...
commit 84b0a7d96ca1c94b7dcbcee072a742c003052f61 1 parent d6eb1b6
Ingo Schommer authored April 17, 2012
30  admin/css/screen.css
@@ -121,7 +121,7 @@ body, html { font-size: 12px; line-height: 16px; font-family: Arial, sans-serif;
121 121
 .cms .ui-tabs .ui-tabs-nav li { top: 0; }
122 122
 .cms .ui-tabs .ui-tabs-nav li a { padding: 0 15px; }
123 123
 .cms .ui-tabs .ui-tabs-nav.ui-state-active { border-color: gray; }
124  
-.cms .ui-tabs .ui-tabs-panel { background: transparent; padding: 0; }
  124
+.cms .ui-tabs .ui-tabs-panel { background: transparent; }
125 125
 .cms .ui-widget-content, .cms .ui-widget { color: #444444; font-size: 12px; font-family: Arial, sans-serif; border: 0; }
126 126
 .cms .ui-widget-header { background-color: #b0bec7; padding: 8px 8px 6px 8px; border-bottom: 2px solid #8399a7; background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2RkZTNlNyIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzkyYTViMiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #dde3e7), color-stop(100%, #92a5b2)); background-image: -webkit-linear-gradient(#dde3e7, #92a5b2); background-image: -moz-linear-gradient(#dde3e7, #92a5b2); background-image: -o-linear-gradient(#dde3e7, #92a5b2); background-image: -ms-linear-gradient(#dde3e7, #92a5b2); background-image: linear-gradient(#dde3e7, #92a5b2); border-bottom: 3px solid #5c7382; padding: 8px; -moz-border-radius: 0; -webkit-border-radius: 0; -o-border-radius: 0; -ms-border-radius: 0; -khtml-border-radius: 0; border-radius: 0; }
127 127
 .cms .ui-widget-header .ui-dialog-title { padding: 6px 0; text-shadow: #ced7dc 1px 1px 0; }
@@ -488,20 +488,20 @@ form.member-profile-form .ui-tabs-nav .ui-corner-all, form.member-profile-form .
488 488
 .ui-dialog .ui-dialog-titlebar.ui-widget-header .ui-dialog-title { position: absolute; }
489 489
 .ui-dialog .cms-dialog-content { background: url("../images/textures/bg_cms_main_content.png") repeat left top #f0f3f4; padding-bottom: 8px; padding-top: 0px; }
490 490
 .ui-dialog .cms-dialog-content .Actions { overflow: auto; margin: 8px 0; padding-bottom: 8px; float: right; }
491  
-.ui-dialog .cms-dialog-content .ss-tabset { -moz-border-radius: none; -webkit-border-radius: none; -o-border-radius: none; -ms-border-radius: none; -khtml-border-radius: none; border-radius: none; }
492  
-.ui-dialog .cms-dialog-content .ss-tabset .tab { background: none; overflow-y: auto; }
493  
-.ui-dialog .cms-dialog-content .ss-tabset.ui-tabs { background: none; }
494  
-.ui-dialog .cms-dialog-content .ss-tabset.ui-tabs .ui-tabs-nav { border: none; padding: 0 40px 0 0; float: right; }
495  
-.ui-dialog .cms-dialog-content .ss-tabset.ui-tabs .ui-tabs-nav li { margin: 0; font-weight: bold; line-height: 16px; padding: 12px 12px 10px; border-bottom: 2px solid #B3B3B3; }
496  
-.ui-dialog .cms-dialog-content .ss-tabset.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: -1px; padding-bottom: 11px; }
497  
-.ui-dialog .cms-dialog-content .ss-tabset.ui-tabs .ui-tabs-nav li:first-child { margin-left: 15px; }
498  
-.ui-dialog .cms-dialog-content .ss-tabset.ui-tabs .ui-tabs-nav .ui-state-focus a { outline: none; }
499  
-.ui-dialog .cms-dialog-content .ss-tabset.ui-tabs .ui-tabs-nav .ui-state-default, .ui-dialog .cms-dialog-content .ss-tabset.ui-tabs .ui-tabs-nav .ui-widget-content .ui-state-default, .ui-dialog .cms-dialog-content .ss-tabset.ui-tabs .ui-tabs-nav .ui-widget-header .ui-state-default { background-color: #b0bec7; background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2IwYmVjNyIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzhjYTFhZSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #b0bec7), color-stop(100%, #8ca1ae)); background-image: -webkit-linear-gradient(#b0bec7, #8ca1ae); background-image: -moz-linear-gradient(#b0bec7, #8ca1ae); background-image: -o-linear-gradient(#b0bec7, #8ca1ae); background-image: -ms-linear-gradient(#b0bec7, #8ca1ae); background-image: linear-gradient(#b0bec7, #8ca1ae); border-right-color: #a6a6a6; border-left-color: #d9d9d9; border-bottom: none; border-top: none; text-shadow: white 0 1px 0; }
500  
-.ui-dialog .cms-dialog-content .ss-tabset.ui-tabs .ui-tabs-nav .ui-state-active, .ui-dialog .cms-dialog-content .ss-tabset.ui-tabs .ui-tabs-nav .ui-widget-content .ui-state-active, .ui-dialog .cms-dialog-content .ss-tabset.ui-tabs .ui-tabs-nav .ui-widget-header .ui-state-active { background: #eceff1; border-right-color: #a6a6a6; border-left-color: #a6a6a6; margin-right: -1px; margin-left: -3px; z-index: 2; }
501  
-.ui-dialog .cms-dialog-content .ss-tabset.ui-tabs .ui-tabs-nav .ui-state-active a, .ui-dialog .cms-dialog-content .ss-tabset.ui-tabs .ui-tabs-nav .ui-widget-content .ui-state-active a, .ui-dialog .cms-dialog-content .ss-tabset.ui-tabs .ui-tabs-nav .ui-widget-header .ui-state-active a { border-bottom: none; border-top: none; }
502  
-.ui-dialog .cms-dialog-content .ss-tabset.ui-tabs .ui-tabs-nav .ui-corner-all, .ui-dialog .cms-dialog-content .ss-tabset.ui-tabs .ui-tabs-nav .ui-corner-top, .ui-dialog .cms-dialog-content .ss-tabset.ui-tabs .ui-tabs-nav .ui-corner-right, .ui-dialog .cms-dialog-content .ss-tabset.ui-tabs .ui-tabs-nav .ui-corner-tr { border-radius: 0; }
503  
-.ui-dialog .cms-dialog-content .ss-tabset.ui-tabs .ui-tabs-nav .ui-corner-all, .ui-dialog .cms-dialog-content .ss-tabset.ui-tabs .ui-tabs-nav .ui-corner-top, .ui-dialog .cms-dialog-content .ss-tabset.ui-tabs .ui-tabs-nav .ui-corner-left, .ui-dialog .cms-dialog-content .ss-tabset.ui-tabs .ui-tabs-nav .ui-corner-tl { border-radius: 0; }
504  
-.ui-dialog .cms-dialog-content .ss-tabset.ui-tabs .ui-tabs-panel { background: url("../images/textures/bg_cms_main_content.png") repeat left top #f0f3f4; overflow-x: hidden; clear: both; border-top: 1px solid #a6a6a6; }
  491
+.ui-dialog .cms-dialog-content .cms-tabset { -moz-border-radius: none; -webkit-border-radius: none; -o-border-radius: none; -ms-border-radius: none; -khtml-border-radius: none; border-radius: none; }
  492
+.ui-dialog .cms-dialog-content .cms-tabset .tab { background: none; overflow-y: auto; }
  493
+.ui-dialog .cms-dialog-content .cms-tabset.ui-tabs { background: none; }
  494
+.ui-dialog .cms-dialog-content .cms-tabset.ui-tabs .ui-tabs-nav { border: none; padding: 0 40px 0 0; float: right; }
  495
+.ui-dialog .cms-dialog-content .cms-tabset.ui-tabs .ui-tabs-nav li { margin: 0; font-weight: bold; line-height: 16px; padding: 12px 12px 10px; border-bottom: 2px solid #B3B3B3; }
  496
+.ui-dialog .cms-dialog-content .cms-tabset.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: -1px; padding-bottom: 11px; }
  497
+.ui-dialog .cms-dialog-content .cms-tabset.ui-tabs .ui-tabs-nav li:first-child { margin-left: 15px; }
  498
+.ui-dialog .cms-dialog-content .cms-tabset.ui-tabs .ui-tabs-nav .ui-state-focus a { outline: none; }
  499
+.ui-dialog .cms-dialog-content .cms-tabset.ui-tabs .ui-tabs-nav .ui-state-default, .ui-dialog .cms-dialog-content .cms-tabset.ui-tabs .ui-tabs-nav .ui-widget-content .ui-state-default, .ui-dialog .cms-dialog-content .cms-tabset.ui-tabs .ui-tabs-nav .ui-widget-header .ui-state-default { background-color: #b0bec7; background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2IwYmVjNyIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzhjYTFhZSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #b0bec7), color-stop(100%, #8ca1ae)); background-image: -webkit-linear-gradient(#b0bec7, #8ca1ae); background-image: -moz-linear-gradient(#b0bec7, #8ca1ae); background-image: -o-linear-gradient(#b0bec7, #8ca1ae); background-image: -ms-linear-gradient(#b0bec7, #8ca1ae); background-image: linear-gradient(#b0bec7, #8ca1ae); border-right-color: #a6a6a6; border-left-color: #d9d9d9; border-bottom: none; border-top: none; text-shadow: white 0 1px 0; }
  500
+.ui-dialog .cms-dialog-content .cms-tabset.ui-tabs .ui-tabs-nav .ui-state-active, .ui-dialog .cms-dialog-content .cms-tabset.ui-tabs .ui-tabs-nav .ui-widget-content .ui-state-active, .ui-dialog .cms-dialog-content .cms-tabset.ui-tabs .ui-tabs-nav .ui-widget-header .ui-state-active { background: #eceff1; border-right-color: #a6a6a6; border-left-color: #a6a6a6; margin-right: -1px; margin-left: -3px; z-index: 2; }
  501
+.ui-dialog .cms-dialog-content .cms-tabset.ui-tabs .ui-tabs-nav .ui-state-active a, .ui-dialog .cms-dialog-content .cms-tabset.ui-tabs .ui-tabs-nav .ui-widget-content .ui-state-active a, .ui-dialog .cms-dialog-content .cms-tabset.ui-tabs .ui-tabs-nav .ui-widget-header .ui-state-active a { border-bottom: none; border-top: none; }
  502
+.ui-dialog .cms-dialog-content .cms-tabset.ui-tabs .ui-tabs-nav .ui-corner-all, .ui-dialog .cms-dialog-content .cms-tabset.ui-tabs .ui-tabs-nav .ui-corner-top, .ui-dialog .cms-dialog-content .cms-tabset.ui-tabs .ui-tabs-nav .ui-corner-right, .ui-dialog .cms-dialog-content .cms-tabset.ui-tabs .ui-tabs-nav .ui-corner-tr { border-radius: 0; }
  503
+.ui-dialog .cms-dialog-content .cms-tabset.ui-tabs .ui-tabs-nav .ui-corner-all, .ui-dialog .cms-dialog-content .cms-tabset.ui-tabs .ui-tabs-nav .ui-corner-top, .ui-dialog .cms-dialog-content .cms-tabset.ui-tabs .ui-tabs-nav .ui-corner-left, .ui-dialog .cms-dialog-content .cms-tabset.ui-tabs .ui-tabs-nav .ui-corner-tl { border-radius: 0; }
  504
+.ui-dialog .cms-dialog-content .cms-tabset.ui-tabs .ui-tabs-panel { background: url("../images/textures/bg_cms_main_content.png") repeat left top #f0f3f4; overflow-x: hidden; clear: both; border-top: 1px solid #a6a6a6; }
505 505
 .ui-dialog .cms-dialog-content .clear { clear: both; }
506 506
 .ui-dialog.loading { background-image: url(../images/spinner.gif); background-position: 50% 50%; background-repeat: no-repeat; }
507 507
 
8  admin/javascript/LeftAndMain.Content.js
@@ -14,14 +14,14 @@
14 14
 				var self = this;
15 15
 				
16 16
 				// Force initialization of tabsets to avoid layout glitches
17  
-				this.find('.ss-tabset').redrawTabs();
  17
+				this.find('.cms-tabset').redrawTabs();
18 18
 				
19 19
 				this._super();
20 20
 			},
21 21
 						
22 22
 			redraw: function() {
23 23
 				// Force initialization of tabsets to avoid layout glitches
24  
-				this.add(this.find('.ss-tabset')).redrawTabs();
  24
+				this.add(this.find('.cms-tabset')).redrawTabs();
25 25
 
26 26
 				this.layout();
27 27
 			},
@@ -64,7 +64,7 @@
64 64
 				
65 65
 				// save tab selections in order to reconstruct them later
66 66
 				var selectedTabs = [];
67  
-				form.find('.ss-tabset').each(function(i, el) {
  67
+				form.find('.cms-tabset').each(function(i, el) {
68 68
 					if($(el).attr('id')) selectedTabs.push({id:$(el).attr('id'), selected:$(el).tabs('option', 'selected')});
69 69
 				});
70 70
 
@@ -99,7 +99,7 @@
99 99
 						}
100 100
 
101 101
 						// Re-init tabs (in case the form tag itself is a tabset)
102  
-						if(self.hasClass('ss-tabset')) self.removeClass('ss-tabset').addClass('ss-tabset');
  102
+						if(self.hasClass('cms-tabset')) self.removeClass('cms-tabset').addClass('cms-tabset');
103 103
 
104 104
 						// re-select previously saved tabs
105 105
 						$.each(selectedTabs, function(i, selectedTab) {
2  admin/javascript/LeftAndMain.EditForm.js
@@ -102,7 +102,7 @@
102 102
 						
103 103
 			redraw: function() {
104 104
 				// Force initialization of tabsets to avoid layout glitches
105  
-				this.add(this.find('.ss-tabset')).redrawTabs();
  105
+				this.add(this.find('.cms-tabset')).redrawTabs();
106 106
 
107 107
 				var approxWidth = $('.cms-container').width() - $('.cms-menu').width();
108 108
 				this.find('.cms-content-actions').width(approxWidth).height('auto');
2  admin/scss/_style.scss
@@ -1252,7 +1252,7 @@ form.member-profile-form {
1252 1252
 			float: right;
1253 1253
 		}
1254 1254
 
1255  
-		.ss-tabset {	
  1255
+		.cms-tabset {	
1256 1256
 			@include border-radius(none);
1257 1257
 
1258 1258
 			.tab {
12  javascript/TabSet.js
@@ -2,10 +2,6 @@
2 2
 	$.entwine('ss', function($){
3 3
 		/**
4 4
 		 * Lightweight wrapper around jQuery UI tabs.
5  
-		 * Ensures that anchor links are set properly,
6  
-		 * and any nested tabs are scrolled if they have
7  
-		 * their height explicitly set. This is important
8  
-		 * for forms inside the CMS layout.
9 5
 		 */
10 6
 		$('.ss-tabset').entwine({
11 7
 			onmatch: function() {
@@ -16,13 +12,7 @@
16 12
 			
17 13
 			redrawTabs: function() {
18 14
 				this.rewriteHashlinks();
19  
-
20  
-				var id = this.attr('id'), cookieId = 'ui-tabs-' + id;
21  
-
22  
-				// Fix for wrong cookie storage of deselected tabs
23  
-				if($.cookie && id && $.cookie(cookieId) == -1) $.cookie(cookieId, 0);
24  
-
25  
-				this.tabs({cookie: ($.cookie && id) ? { expires: 30, path: '/', name: cookieId } : false});
  15
+				this.tabs();
26 16
 			},
27 17
 		
28 18
 			/**

0 notes on commit 84b0a7d

Please sign in to comment.
Something went wrong with that request. Please try again.