_tree.scss 11.7 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619
/**
 * This file defines the jstree base styling (see http://jstree.com), as well as any
 * customizations (see bottom of file).
 * 
 * The styles are usually added through jstree.js on DOM load, 
 * but we need it earlier in order to correctly display the uninitialized tree.
 */
.cms, .TreeDropdownField .treedropdownfield-panel {
	.jstree {
		> ul > li {
			margin-left: 0px;
		}
		ul, li {
			display: block;
			margin: 0;
			padding: 0;
			background: none;
			list-style-type: none;
		}
		li {
			min-height: 18px;
			line-height: 25px;
			white-space: nowrap;
			margin-left: 18px;
			min-width: 18px;
			&.jstree-open > ul {
				display: block;
			}
			&.jstree-closed > ul {
				display: none;
			}
			&.disabled > a {
				color: #aaaaaa;
				&:hover {
					background: transparent;
					cursor: default;
				}
			}
			&.edit-disabled > a {
				color: #aaaaaa;
			}
			// Expand/collapse arrows
			& > .jstree-icon {
				cursor: pointer;
			}
		}
		ins {
			display: inline-block;
			text-decoration: none;
			width: 18px;
			height: 18px;
			margin: 0 0 0 0;
			padding: 0;
			float: left;
		}
		a {
			display: inline-block;
			line-height: 16px;
			height: 16px;
			color: black;
			white-space: nowrap;
			text-decoration: none;
			padding: 1px 2px;
			margin: 0;
			border: 1px solid #fff;	
			&:focus,
			&:active,
			&:hover {
				text-decoration: none;
				cursor: pointer;
				text-shadow: none;
			}
			> {
				ins {
					height: 16px;
					width: 16px;
					&.jstree-checkbox{
						height:19px; //Larger to help avoid accidental page loads when trying to click checkboxes
       				}
				}
				.jstree-icon {
					margin-right: 3px;
				}
			}
		}
		.jstree-real-checkbox {
			display: none;
		}
		.jstree-wholerow-real {
			position: relative;
			z-index: 1;
			li {
				cursor: pointer;
			}
			a {
				border-left-color: transparent !important;
				border-right-color: transparent !important;
			}
		}

		.jstree-wholerow {
			position: relative;
			z-index: 0;
			height: 0;
			margin: 0 !important;
			padding: 0 !important;
			background: transparent !important;
			ul,li {
				margin: 0 !important;
				padding: 0 !important;
				background: transparent !important;
				width: 100%;
			}
			a, a:hover{
				margin: 0 !important;
				padding: 0 !important;
				text-indent: -9999px !important;
				width: 100%;
				border-right-width: 0px !important;
				border-left-width: 0px !important;				
			}
			ins, 
			span, 
			input {
				display: none !important;
			}
		}
		.jstree-wholerow-span {
			position: absolute;
			left: 0;
			margin: 0px;
			padding: 0;
			height: 18px;
			border-width: 0;
			padding: 0;
			z-index: 0;
		}
	}

	// Custom styles
	.jstree-apple.jstree-focused {
		background: none;	
		.jstree-apple > ul {
			background: none;
		}
	}

	// Hide drag icons by default. Actual page icons
	// are in nested <span>, not handled directly through jstree lib
	a > .jstree-icon {
		display: none;
	}

	// Show drag icons when draggable class is applied
	.draggable a > .jstree-icon {
		display: block;
	}


	li.jstree-open > ul {
		display: block;
		margin-left: -13px;
		li ul {
			margin-left:2px;
		}
	}
	li.jstree-closed > ul {
		display: none;
	}

	.jstree-rtl {
		a > .jstree-icon {
			margin-left: 3px;
			margin-right: 0;
		}
		li {
			margin-left: 0;
			margin-right: 18px;
		}
		> ul > li {
			margin-right: 0px;
		}
	}

	.jstree-themeroller{
		a {
			padding: 0 2px;
		}
		.ui-icon {
			overflow: visible;
		}
		.jstree-no-icon {
			display: none;
		}
	} 

	#jstree-marker {
		padding: 0;
		margin: 0;
		overflow: hidden;
		position: absolute;
		top: -30px;
		background-repeat: no-repeat;
		display: none;
		line-height: 10px;
		font-size: 12px;		
		height: 12px;		
		width: 8px;		
		z-index: 10001;		
		background-color: transparent;
		text-shadow: 1px 1px 1px white;
		color: black;		
	}
	#jstree-marker-line {
		padding: 0;
		margin: 0;
		overflow: hidden;
		position: absolute;
		top: -30px;
		background-repeat: no-repeat;
		display: none;
		line-height: 0%;
		font-size: 1px;		
		height: 1px;
		width: 100px;		
		z-index: 10000;		
		background-color: #456c43;
		cursor: pointer;
		border: 1px solid #eeeeee;
		border-left: 0;
		-moz-box-shadow: 0px 0px 2px #666;
		-webkit-box-shadow: 0px 0px 2px #666;
		box-shadow: 0px 0px 2px #666;
		-moz-border-radius: 1px;
		border-radius: 1px;
		-webkit-border-radius: 1px;
	}

	#vakata-contextmenu {
		display: block;
		visibility: hidden;
		left: 0;
		top: -200px;
		position: absolute;
		margin: 0;
		padding: 0;
		min-width: 180px;
		background: #FFF;
		border: 1px solid silver;
		z-index: 10000; *width:180px;
		@include box-shadow(0 0 10px #CCC);
		&::before {
			content:"";
			display:block; /* reduce the damage in FF3.0 */
			position:absolute;
			top: -10px;
			left: 24px;
			width:0;
			border-width: 0 6px 10px 6px  ;
			border-color:  #FFF transparent;
			border-style: solid;
			z-index: 10000;
		}
		&::after {
			content:"";
			display:block; /* reduce the damage in FF3.0 */
			position:absolute;
			top: -11px;
			left: 23px;
			width:0;
			border-width: 0 7px 11px 7px  ;
			border-color:  #CCC transparent;
			border-style: solid;
		}
		ul {
			min-width: 180px; 
			*width:180px;
		}
		ul,li{
			margin: 0;
			padding: 0 ;
			list-style-type: none;
			display: block;
		}
		li {
			line-height: 20px;
			min-height: 23px;
			position: relative;
			padding: 0px;
			&:last-child {
				margin-bottom: 1px;
			}
			a {
				padding: 1px 10px;
				line-height: 23px;
				display: block;
				text-decoration: none;
				margin: 1px 1px 0 1px;
				border: 0; 
				&:hover {
					padding: 1px 10px;
					background: #3875d7;
					@include background-image(linear-gradient(top, #3875d7 20%, #2a62bc 90%));
					color: #FFF;
					border: none;
				}
			}
			ins {
				float: left;
				width: 0;
				height: 0;
				text-decoration: none;
				margin-right: 2px;
			}
			.jstree-pageicon {
				margin-top: 3px;
				margin-right: 5px;
			}
			&.vakata-hover > a{
				padding: 1px 10px;
				background: #3875d7;
				@include background-image(linear-gradient(top, #3875d7 20%, #2a62bc 90%));
				color: #FFF;
				border: none;
			} 
		}
	}
	
	#vakata-contextmenu{
		.right {
			right: 100%;
			left: auto;
		}
		.bottom {
			bottom: -1px;
			top: auto;
		}
		li ul {
			display: none;
			position: absolute;
			top: -2px;
			left: 100%;
			background: #FFF;
			border: 1px solid silver;
			@include box-shadow(0 0 10px #CCC);
			&.col-2{
				width:180px * 2; // 2x the size of the original ul
				li{
					width:50%;
				}
			}
			&.col-3{
				width:180px * 3; // 3x the size of the original ul
				li{
					width:33%;
				}
			}
			li{
				min-width:180px; 
				float:left;
				a{
					@include hide-text-overflow;
				}
			}
		}
		li{
			&.vakata-separator {
				min-height: 0;
				height: 1px;
				line-height: 1px;
				font-size: 1px;
				overflow: hidden;
				margin: 0 2px;
				background: #ccc; 
				padding:0;
			}
		}
	} 

	#vakata-dragged {
		display: block;
		margin: 0 0 0 0;
		padding: 4px 4px 4px 24px;
		position: absolute;
		top: -2000px;
		line-height: 16px;
		z-index: 10000;
		ins {
			display: block;
			text-decoration: none;
			width: 16px;
			height: 16px;
			margin: 0 0 0 0;
			padding: 0;
			position: absolute;
			top: 4px;
			left: 4px;
			-moz-border-radius: 4px;
			border-radius: 4px;
			-webkit-border-radius: 4px;
		}
		.jstree-ok {
			background: green;
		}
		.jstree-invalid {
			background: red;
		}
	}

}

.jstree-apple {
	li, .jstree-apple ins {
		background:none;
	}
	.jstree-unchecked, .jstree-checked, .jstree-undetermined {
		> a > .jstree-checkbox {
			margin-right:3px;
		}
	}
}

.tree-holder, .cms-tree{
	&.jstree-apple{
		li{
			padding: 0px;
			clear:  left;
			&.Root {
				& strong {
					font-weight:  bold;
					padding-left:  1px;
				}
				
				& > a .jstree-icon {
					background-position: -56px -36px;
				}
			}
			&.status-deletedonlive {
				.text {
					text-decoration: line-through;
				}
			}
			&.jstree-checked{
				> a, > a:link{
					background-color: $color-cms-batchactions-menu-selected-background;
				}
			}
			&.disabled {
				> a > .jstree-checkbox {
					background-position: -57px -54px;
				}
			}
			&.readonly {
				color: $color-text-disabled;
				padding-left: 18px;

				// Don't show drag icons or required spacing
				a, a:link {
					margin: 0;
					padding: 0;
				}
				.jstree-icon {
					display: none;
				}
			}
		}	
		a, a:link {
			color:  $color-text-blue-link;
			padding: 3px 6px 3px 3px;
			border: none;
			display:  inline-block;
			margin-right: 5px;
		}	
		ins {
			background-color: transparent;
			background-image: url(../images/sitetree_ss_default_icons.png);
		}	
		span.badge {
			clear: both;
			text-transform: uppercase;
			display: inline-block;
			padding: 0px 3px;
			font-size: 0.75em;
			line-height: 1em;
			margin-left: 3px;
			margin-right: 6px;
			margin-top:  -1px;
			@include border-radius(2px, 2px);
	
			&.status-modified, &.status-addedtodraft  {
				color:  #7E7470;
				border: 1px solid #C9B800;
				background-color: #FFF0BC;
			}
			&.status-deletedonlive, &.status-removedfromdraft {
				color:  #636363;
				border: 1px solid #E49393;
				background-color: #F2DADB;
			}
			&.status-workflow-approval {
				color:  #56660C;
				border: 1px solid #7C8816;
				background-color: #DAE79A;
			}
		}

		/* comment speech bubble - ccs3 only - source: http://nicolasgallagher.com/pure-css-speech-bubbles/demo/ */
		span.comment-count {
			clear: both;
			position: relative;
			text-transform: uppercase;
			display: inline-block;
			overflow: visible;
			padding: 0px 3px;
			font-size: 0.75em;
			line-height: 1em;
			margin-left: 3px;
			margin-right: 6px;
			@include border-radius(2px, 2px);
			color:  #7E7470;
			border: 1px solid #C9B800;
			background-color: #FFF0BC;

			&:before {
				content:"";
			    position:absolute;
			    border-style:solid;
			    display:block; 
			    width:0;
			    bottom:-4px; /* value = - border-top-width - border-bottom-width */
			    left:3px; /* controls horizontal position */
			    border-width:4px 4px 0;			    
			    border-color:#C9B800 transparent;			  
			}
			&:after {
				content:"";
			    position:absolute;
			    border-style:solid;
			    /* reduce the damage in FF3.0 */
			    display:block;
			    width:0;
			    bottom:-3px; /* value = - border-top-width - border-bottom-width */
			    left:4px; /* value = (:before left) + (:before border-left) - (:after border-left) */
			    border-width:3px 3px 0;			    
			    border-color:#FFF0BC transparent;			    
			}		
		}
		
		.jstree-hovered {
			text-shadow: none;
			text-decoration: none;    
		}	
		.jstree-closed > ins { 
			background-position:0 0; 
		}
		.jstree-open > ins { 
			background-position:-20px 0;
		}
	}
} 


a .jstree-pageicon {
	float: left;
	margin-right: 4px;
	li.class-HomePage > &{
		background-position: 0 -48px;
	}
	li.class-RedirectorPage > & {
		background-position: 0 -16px;
	}
	li.class-VirtualPage > & {
		background-position: 0 -32px;
	}
	li.class-ErrorPage > & {
		background-position: 0 -112px;
	}
}


.cms-tree {
	visibility: hidden; // enabled by JS to avoid layout glitches
	&.multiple {
		li > a {
			// Hide draggable icon when multiselect is enabled
			 > .jstree-icon {
				display: none;
				// But show the checkbox
				 &.jstree-checkbox {
					display: inline-block;
				}
			}			
		}

		li#record-0 {
			// Hide checkbox on root node (shouldn't be selectable to avoid weird states when trying to e.g. remove it)
			> a .jstree-checkbox {
				display: none;
			}
		}
	}

	&.jstree-loading {
		li#record-0 > .jstree-icon {
			background: url(../images/throbber.gif) top left no-repeat;
		}
	}

	// Show the loading indicator on the page icon rather than the default
	// jstree icon (which is only used for its dragging handles)
	a.jstree-loading{
		.jstree-icon {
			background-image: none !important;
		}
		.jstree-pageicon {
			background: url(../images/throbber.gif) top left no-repeat;
		}
	} 
}