Merge branch 'BatJan-dev-v8' into dev-v8
@@ -1,5 +0,0 @@
|
||||
/*
|
||||
** Unobtrusive Ajax support library for jQuery
|
||||
** Copyright (C) Microsoft Corporation. All rights reserved.
|
||||
*/
|
||||
(function(a){var b="unobtrusiveAjaxClick",g="unobtrusiveValidation";function c(d,b){var a=window,c=(d||"").split(".");while(a&&c.length)a=a[c.shift()];if(typeof a==="function")return a;b.push(d);return Function.constructor.apply(null,b)}function d(a){return a==="GET"||a==="POST"}function f(b,a){!d(a)&&b.setRequestHeader("X-HTTP-Method-Override",a)}function h(c,b,e){var d;if(e.indexOf("application/x-javascript")!==-1)return;d=(c.getAttribute("data-ajax-mode")||"").toUpperCase();a(c.getAttribute("data-ajax-update")).each(function(f,c){var e;switch(d){case"BEFORE":e=c.firstChild;a("<div />").html(b).contents().each(function(){c.insertBefore(this,e)});break;case"AFTER":a("<div />").html(b).contents().each(function(){c.appendChild(this)});break;default:a(c).html(b)}})}function e(b,e){var j,k,g,i;j=b.getAttribute("data-ajax-confirm");if(j&&!window.confirm(j))return;k=a(b.getAttribute("data-ajax-loading"));i=b.getAttribute("data-ajax-loading-duration")||0;a.extend(e,{type:b.getAttribute("data-ajax-method")||undefined,url:b.getAttribute("data-ajax-url")||undefined,beforeSend:function(d){var a;f(d,g);a=c(b.getAttribute("data-ajax-begin"),["xhr"]).apply(this,arguments);a!==false&&k.show(i);return a},complete:function(){k.hide(i);c(b.getAttribute("data-ajax-complete"),["xhr","status"]).apply(this,arguments)},success:function(a,e,d){h(b,a,d.getResponseHeader("Content-Type")||"text/html");c(b.getAttribute("data-ajax-success"),["data","status","xhr"]).apply(this,arguments)},error:c(b.getAttribute("data-ajax-failure"),["xhr","status","error"])});e.data.push({name:"X-Requested-With",value:"XMLHttpRequest"});g=e.type.toUpperCase();if(!d(g)){e.type="POST";e.data.push({name:"X-HTTP-Method-Override",value:g})}a.ajax(e)}function i(c){var b=a(c).data(g);return!b||!b.validate||b.validate()}a("a[data-ajax=true]").live("click",function(a){a.preventDefault();e(this,{url:this.href,type:"GET",data:[]})});a("form[data-ajax=true] input[type=image]").live("click",function(c){var g=c.target.name,d=a(c.target),f=d.parents("form")[0],e=d.offset();a(f).data(b,[{name:g+".x",value:Math.round(c.pageX-e.left)},{name:g+".y",value:Math.round(c.pageY-e.top)}]);setTimeout(function(){a(f).removeData(b)},0)});a("form[data-ajax=true] :submit").live("click",function(c){var e=c.target.name,d=a(c.target).parents("form")[0];a(d).data(b,e?[{name:e,value:c.target.value}]:[]);setTimeout(function(){a(d).removeData(b)},0)});a("form[data-ajax=true]").live("submit",function(d){var c=a(this).data(b)||[];d.preventDefault();if(!i(this))return;e(this,{url:this.action,type:this.method||"GET",data:c.concat(a(this).serializeArray())})})})(jQuery);
|
||||
@@ -1,19 +0,0 @@
|
||||
.umbracoDialog a {
|
||||
color: blue;
|
||||
}
|
||||
|
||||
.umbracoDialog div {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
input[type=text] {
|
||||
width: 350px;
|
||||
}
|
||||
|
||||
input[type=submit] {
|
||||
width: 90px;
|
||||
}
|
||||
|
||||
.submit-footer {
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
Before Width: | Height: | Size: 98 B |
|
Before Width: | Height: | Size: 43 B |
|
Before Width: | Height: | Size: 162 B |
|
Before Width: | Height: | Size: 164 B |
|
Before Width: | Height: | Size: 194 B |
|
Before Width: | Height: | Size: 193 B |
@@ -1,101 +0,0 @@
|
||||
.panel {
|
||||
margin: 0 auto; /* center for now */
|
||||
|
||||
background: url(images/panel_bg.gif) top repeat-x;
|
||||
font-size: 100%;
|
||||
padding: 0px;
|
||||
display: block;
|
||||
border: 0px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.panelstatus {
|
||||
margin: 0 auto; /* center for now */
|
||||
width: 17em; /* ems so it will grow */
|
||||
font-size: 100%;
|
||||
}
|
||||
|
||||
.panel .boxhead {
|
||||
background: url(images/panel_boxhead_bg.gif) top left no-repeat;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
text-align: center;
|
||||
display: block;
|
||||
width: auto;
|
||||
border: 0px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.panel .boxhead h2, .panel .boxfooter h2 {
|
||||
background: url(images/panel_boxhead_h2_bg.gif) top right no-repeat;
|
||||
margin: 0px;
|
||||
padding: 3px 0px 1px 10px;
|
||||
font-weight: bold;
|
||||
text-align: left;
|
||||
font-family: "Trebuchet MS", verdana, arial;
|
||||
font-size: 10px; color: #378080;
|
||||
display: block;
|
||||
height: 14px;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.panel .boxbody {
|
||||
border-top: 1px solid #cac9c9;
|
||||
border-right: 1px solid #cac9c9;
|
||||
background: url(images/panel_boxfooter_bg.gif) bottom left repeat-y #fff;
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.panel .boxfooter {
|
||||
height: 12px;
|
||||
margin: 0;
|
||||
padding: 0px;
|
||||
background: url(images/panel_boxfooter_bg.gif) 11px 11px repeat-x #fff;
|
||||
}
|
||||
|
||||
.panel .boxfooter .statusBar{height: 12px; margin: 0px; background: url(images/panel_boxfooter_statusBar_bg.gif) top left no-repeat;}
|
||||
.panel .boxfooter .statusBar h2{display: block; height: 12px; margin: 0px; padding: 0px; background: url(images/panel_boxfooter_statusBar_h2_bg.gif) top right no-repeat;}
|
||||
|
||||
|
||||
.panelstatus .boxfooter {
|
||||
font-size: 9px;
|
||||
color: #999;
|
||||
height: 15px;
|
||||
margin: 0;
|
||||
padding: 5px 0 8px 15px;
|
||||
}
|
||||
|
||||
.panel .content {
|
||||
overflow: auto;
|
||||
padding: 0px 10px 0px 10px;
|
||||
margin:0px;
|
||||
position: relative;
|
||||
width: auto !Important;
|
||||
width: 10em;
|
||||
}
|
||||
|
||||
.panel .content .innerContent{padding: 0px; margin: 0px; width: 100%;}
|
||||
|
||||
#treeWindow .innerContent{height: 100%;}
|
||||
|
||||
.panel .menubar_panel {
|
||||
background-image: url(../tabView/images/background.gif);
|
||||
height:32px;
|
||||
|
||||
display: block;
|
||||
border-bottom:1px solid #CAC9C9;
|
||||
border-left:1px solid #CAC9C9;
|
||||
border-right:1px solid #CAC9C9 !Important;
|
||||
|
||||
overflow:hidden;
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
|
||||
.guiDialogTinyMark {
|
||||
font-family: "Trebuchet MS", verdana, arial;
|
||||
font-size: 10px; color: #606057;
|
||||
}
|
||||
|
Before Width: | Height: | Size: 3.4 KiB |
@@ -1,4 +0,0 @@
|
||||
#umbracoPreviewBadge
|
||||
{
|
||||
position: absolute; top: 0; right: 0; border: 0; width: 149px; height: 149px; background-image: url(previewModeBadge.png) no-repeat;
|
||||
}
|
||||
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 314 B |
|
Before Width: | Height: | Size: 102 B |
|
Before Width: | Height: | Size: 113 B |
@@ -1,25 +0,0 @@
|
||||
var step = 8;
|
||||
var padding = 10;
|
||||
|
||||
function progressBarUpdate(id, percent) {
|
||||
var total = document.getElementById("progressBar" + id).style.width;
|
||||
total = Math.round(total.substring(0, total.length-2))-padding;
|
||||
var onePercent = total / 100;
|
||||
var progress = Math.round(onePercent*percent);
|
||||
if (progress % step == 0 || percent > 99) {
|
||||
document.getElementById("progressBar" + id + "_indicator").style.width = progress;
|
||||
}
|
||||
}
|
||||
|
||||
function progressBarUpdateLabel(id, text) {
|
||||
document.getElementById("progressBar" + id + "_text").innerHTML = text;
|
||||
}
|
||||
|
||||
function progressBarTest(id, percent) {
|
||||
progressBarUpdate(id, percent);
|
||||
progressBarUpdateLabel(id, percent + '%');
|
||||
if (percent < 100) {
|
||||
percent++;
|
||||
setTimeout("progressBarTest('" + id + "', " + percent + ")", 100);
|
||||
}
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
.progressIndicator {
|
||||
background: url(images/indicator.gif) repeat-x;
|
||||
height: 8px;
|
||||
}
|
||||
|
||||
.progressContainerLeft {
|
||||
background: url(images/container_left.gif) repeat-x;
|
||||
padding: 3px 0px 2px 5px;
|
||||
float: left;
|
||||
margin: 0px;
|
||||
height: 13px;
|
||||
}
|
||||
|
||||
.progressContainerRight {
|
||||
background: url(images/container_right.gif) no-repeat;
|
||||
padding: 0px;
|
||||
width: 4px;
|
||||
margin: 0px;
|
||||
float: left;
|
||||
height: 13px;
|
||||
}
|
||||
|
||||
.progressBar {
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
display: block;
|
||||
}
|
||||
|
Before Width: | Height: | Size: 8.8 KiB |
|
Before Width: | Height: | Size: 554 B |
@@ -1,103 +0,0 @@
|
||||
|
||||
.propertypane {
|
||||
_width: 95%;
|
||||
position: relative;
|
||||
display: block;
|
||||
line-height: 1.1;
|
||||
background: #fff url(images/propertyBackground.gif) top repeat-x;
|
||||
padding: 5px;
|
||||
margin:7px 0px 0px 0px;
|
||||
border: 1px solid #d9d7d7;
|
||||
text-align:left;
|
||||
clear: both;
|
||||
float: none;
|
||||
}
|
||||
|
||||
.propertypane th
|
||||
{
|
||||
vertical-align: top;
|
||||
text-align:left;
|
||||
font-weight:bold;
|
||||
font-family: Trebuchet MS, Lucida Grande, verdana, arial;
|
||||
font-size:12px;
|
||||
width: 16%;
|
||||
}
|
||||
|
||||
.propertypane,.propertypane td
|
||||
{
|
||||
font-family: Trebuchet MS, Lucida Grande, verdana, arial;
|
||||
font-size:12px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.propertypane small
|
||||
{
|
||||
font-weight: normal;
|
||||
color: #666;
|
||||
font-size: .9em;
|
||||
}
|
||||
.propertypane small strong {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.propertypane div.propertyItem{
|
||||
padding-bottom: 5px;
|
||||
clear: both;
|
||||
font-family: Trebuchet MS, Lucida Grande, verdana, arial;
|
||||
font-size:12px;
|
||||
}
|
||||
|
||||
.propertypane div.propertyItem .propertyItemheader{
|
||||
width: 16%;
|
||||
padding-right: 1%;
|
||||
padding-bottom: 10px;
|
||||
float: left;
|
||||
clear: left;
|
||||
font-weight:bold;
|
||||
}
|
||||
|
||||
.propertypane div.propertyItem .propertyItemContent{
|
||||
float: left;
|
||||
padding-bottom: 5px;
|
||||
clear: right;
|
||||
}
|
||||
|
||||
.propertypane div.propertyItem .propertyItemContent #body_NameTxt
|
||||
{
|
||||
width: 400px;
|
||||
}
|
||||
|
||||
h2.propertypaneTitel{font-size: 14px; color: #999;margin: 7px 0px 0px 0px; padding-bottom: 0px; line-height: 14px;}
|
||||
|
||||
div.propertyPaneFooter{clear: both; height: 1px; overflow: hidden; color: #fff;}
|
||||
|
||||
/* table styles for members section */
|
||||
|
||||
.members_table
|
||||
{
|
||||
width:100%;
|
||||
border:0;
|
||||
border-collapse:collapse;
|
||||
}
|
||||
|
||||
.members_table th,
|
||||
.members_table td
|
||||
{
|
||||
padding:.5em;
|
||||
}
|
||||
|
||||
.members_table th
|
||||
{
|
||||
border-bottom:2px solid #D9D7D7;
|
||||
}
|
||||
|
||||
.members_table td
|
||||
{
|
||||
border-bottom:1px solid #ccc;
|
||||
}
|
||||
|
||||
.members_table .alt
|
||||
{
|
||||
background:#efefef;
|
||||
}
|
||||
@@ -1,523 +0,0 @@
|
||||
(function($) {
|
||||
$.extend({
|
||||
tablesorter: new function() {
|
||||
var parsers = [], widgets = [];
|
||||
this.defaults = { cssHeader: "header", cssAsc: "headerSortUp", cssDesc: "headerSortDown", sortInitialOrder: "asc", sortMultiSortKey: "shiftKey", sortForce: null, sortAppend: null, textExtraction: "simple", parsers: {}, widgets: [], widgetZebra: { css: ["even", "odd"] }, headers: {}, widthFixed: false, cancelSelection: true, sortList: [], headerList: [], dateFormat: "us", decimal: '.', debug: false };
|
||||
|
||||
function benchmark(s, d) { log(s + "," + (new Date().getTime() - d.getTime()) + "ms"); }
|
||||
|
||||
this.benchmark = benchmark;
|
||||
|
||||
function log(s) {
|
||||
if (typeof console != "undefined" && typeof console.debug != "undefined") {
|
||||
console.log(s);
|
||||
}
|
||||
else {
|
||||
alert(s);
|
||||
}
|
||||
}
|
||||
|
||||
function buildParserCache(table, $headers) {
|
||||
if (table.config.debug) {
|
||||
var parsersDebug = "";
|
||||
}
|
||||
var rows = table.tBodies[0].rows;
|
||||
if (table.tBodies[0].rows[0]) {
|
||||
var list = [], cells = rows[0].cells, l = cells.length;
|
||||
for (var i = 0; i < l; i++) {
|
||||
var p = false;
|
||||
if ($.metadata && ($($headers[i]).metadata() && $($headers[i]).metadata().sorter)) {
|
||||
p = getParserById($($headers[i]).metadata().sorter);
|
||||
}
|
||||
else if ((table.config.headers[i] && table.config.headers[i].sorter)) {
|
||||
p = getParserById(table.config.headers[i].sorter);
|
||||
}
|
||||
if (!p) {
|
||||
p = detectParserForColumn(table, cells[i]);
|
||||
}
|
||||
if (table.config.debug) {
|
||||
parsersDebug += "column:" + i + " parser:" + p.id + "\n";
|
||||
}
|
||||
list.push(p);
|
||||
}
|
||||
}
|
||||
if (table.config.debug) {
|
||||
log(parsersDebug);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
;
|
||||
|
||||
function detectParserForColumn(table, node) {
|
||||
var l = parsers.length;
|
||||
for (var i = 1; i < l; i++) {
|
||||
if (parsers[i].is($.trim(getElementText(table.config, node)), table, node)) {
|
||||
return parsers[i];
|
||||
}
|
||||
}
|
||||
return parsers[0];
|
||||
}
|
||||
|
||||
function getParserById(name) {
|
||||
var l = parsers.length;
|
||||
for (var i = 0; i < l; i++) {
|
||||
if (parsers[i].id.toLowerCase() == name.toLowerCase()) {
|
||||
return parsers[i];
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function buildCache(table) {
|
||||
if (table.config.debug) {
|
||||
var cacheTime = new Date();
|
||||
}
|
||||
var totalRows = (table.tBodies[0] && table.tBodies[0].rows.length) || 0, totalCells = (table.tBodies[0].rows[0] && table.tBodies[0].rows[0].cells.length) || 0, parsers = table.config.parsers, cache = { row: [], normalized: [] };
|
||||
for (var i = 0; i < totalRows; ++i) {
|
||||
var c = table.tBodies[0].rows[i], cols = [];
|
||||
cache.row.push($(c));
|
||||
for (var j = 0; j < totalCells; ++j) {
|
||||
cols.push(parsers[j].format(getElementText(table.config, c.cells[j]), table, c.cells[j]));
|
||||
}
|
||||
cols.push(i);
|
||||
cache.normalized.push(cols);
|
||||
cols = null;
|
||||
}
|
||||
;
|
||||
if (table.config.debug) {
|
||||
benchmark("Building cache for " + totalRows + " rows:", cacheTime);
|
||||
}
|
||||
return cache;
|
||||
}
|
||||
|
||||
;
|
||||
|
||||
function getElementText(config, node) {
|
||||
if (!node) return "";
|
||||
var t = "";
|
||||
if (config.textExtraction == "simple") {
|
||||
if (node.childNodes[0] && node.childNodes[0].hasChildNodes()) {
|
||||
t = node.childNodes[0].innerHTML;
|
||||
}
|
||||
else {
|
||||
t = node.innerHTML;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (typeof(config.textExtraction) == "function") {
|
||||
t = config.textExtraction(node);
|
||||
}
|
||||
else {
|
||||
t = $(node).text();
|
||||
}
|
||||
}
|
||||
return t;
|
||||
}
|
||||
|
||||
function appendToTable(table, cache) {
|
||||
if (table.config.debug) {
|
||||
var appendTime = new Date();
|
||||
}
|
||||
var c = cache, r = c.row, n = c.normalized, totalRows = n.length, checkCell = (n[0].length - 1), tableBody = $(table.tBodies[0]), rows = [];
|
||||
for (var i = 0; i < totalRows; i++) {
|
||||
rows.push(r[n[i][checkCell]]);
|
||||
if (!table.config.appender) {
|
||||
var o = r[n[i][checkCell]];
|
||||
var l = o.length;
|
||||
for (var j = 0; j < l; j++) {
|
||||
tableBody[0].appendChild(o[j]);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (table.config.appender) {
|
||||
table.config.appender(table, rows);
|
||||
}
|
||||
rows = null;
|
||||
if (table.config.debug) {
|
||||
benchmark("Rebuilt table:", appendTime);
|
||||
}
|
||||
applyWidget(table);
|
||||
setTimeout(function() { $(table).trigger("sortEnd"); }, 0);
|
||||
}
|
||||
|
||||
;
|
||||
|
||||
function buildHeaders(table) {
|
||||
if (table.config.debug) {
|
||||
var time = new Date();
|
||||
}
|
||||
var meta = ($.metadata) ? true : false, tableHeadersRows = [];
|
||||
for (var i = 0; i < table.tHead.rows.length; i++) {
|
||||
tableHeadersRows[i] = 0;
|
||||
}
|
||||
;
|
||||
$tableHeaders = $("thead th", table);
|
||||
$tableHeaders.each(function(index) {
|
||||
this.count = 0;
|
||||
this.column = index;
|
||||
this.order = formatSortingOrder(table.config.sortInitialOrder);
|
||||
if (checkHeaderMetadata(this) || checkHeaderOptions(table, index)) this.sortDisabled = true;
|
||||
if (!this.sortDisabled) {
|
||||
$(this).addClass(table.config.cssHeader);
|
||||
}
|
||||
table.config.headerList[index] = this;
|
||||
});
|
||||
if (table.config.debug) {
|
||||
benchmark("Built headers:", time);
|
||||
log($tableHeaders);
|
||||
}
|
||||
return $tableHeaders;
|
||||
}
|
||||
|
||||
;
|
||||
|
||||
function checkCellColSpan(table, rows, row) {
|
||||
var arr = [], r = table.tHead.rows, c = r[row].cells;
|
||||
for (var i = 0; i < c.length; i++) {
|
||||
var cell = c[i];
|
||||
if (cell.colSpan > 1) {
|
||||
arr = arr.concat(checkCellColSpan(table, headerArr, row++));
|
||||
}
|
||||
else {
|
||||
if (table.tHead.length == 1 || (cell.rowSpan > 1 || !r[row + 1])) {
|
||||
arr.push(cell);
|
||||
}
|
||||
}
|
||||
}
|
||||
return arr;
|
||||
}
|
||||
|
||||
;
|
||||
|
||||
function checkHeaderMetadata(cell) {
|
||||
if (($.metadata) && ($(cell).metadata().sorter === false)) {
|
||||
return true;
|
||||
}
|
||||
;
|
||||
return false;
|
||||
}
|
||||
|
||||
function checkHeaderOptions(table, i) {
|
||||
if ((table.config.headers[i]) && (table.config.headers[i].sorter === false)) {
|
||||
return true;
|
||||
}
|
||||
;
|
||||
return false;
|
||||
}
|
||||
|
||||
function applyWidget(table) {
|
||||
var c = table.config.widgets;
|
||||
var l = c.length;
|
||||
for (var i = 0; i < l; i++) {
|
||||
getWidgetById(c[i]).format(table);
|
||||
}
|
||||
}
|
||||
|
||||
function getWidgetById(name) {
|
||||
var l = widgets.length;
|
||||
for (var i = 0; i < l; i++) {
|
||||
if (widgets[i].id.toLowerCase() == name.toLowerCase()) {
|
||||
return widgets[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
;
|
||||
|
||||
function formatSortingOrder(v) {
|
||||
var i;
|
||||
if (typeof v != "number") {
|
||||
i = (v.toLowerCase() == "desc") ? 1 : 0;
|
||||
}
|
||||
else {
|
||||
i = (v == (0 || 1)) ? v : 0;
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
function isValueInArray(v, a) {
|
||||
var l = a.length;
|
||||
for (var i = 0; i < l; i++) {
|
||||
if (a[i][0] == v) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function setHeadersCss(table, $headers, list, css) {
|
||||
$headers.removeClass(css[0]).removeClass(css[1]);
|
||||
var h = [];
|
||||
$headers.each(function(offset) {
|
||||
if (!this.sortDisabled) {
|
||||
h[this.column] = $(this);
|
||||
}
|
||||
});
|
||||
var l = list.length;
|
||||
for (var i = 0; i < l; i++) {
|
||||
h[list[i][0]].addClass(css[list[i][1]]);
|
||||
}
|
||||
}
|
||||
|
||||
function fixColumnWidth(table, $headers) {
|
||||
var c = table.config;
|
||||
if (c.widthFixed) {
|
||||
var colgroup = $('<colgroup>');
|
||||
$("tr:first td", table.tBodies[0]).each(function() { colgroup.append($('<col>').css('width', $(this).width())); });
|
||||
$(table).prepend(colgroup);
|
||||
}
|
||||
;
|
||||
}
|
||||
|
||||
function updateHeaderSortCount(table, sortList) {
|
||||
var c = table.config, l = sortList.length;
|
||||
for (var i = 0; i < l; i++) {
|
||||
var s = sortList[i], o = c.headerList[s[0]];
|
||||
o.count = s[1];
|
||||
o.count++;
|
||||
}
|
||||
}
|
||||
|
||||
function multisort(table, sortList, cache) {
|
||||
if (table.config.debug) {
|
||||
var sortTime = new Date();
|
||||
}
|
||||
var dynamicExp = "var sortWrapper = function(a,b) {", l = sortList.length;
|
||||
for (var i = 0; i < l; i++) {
|
||||
var c = sortList[i][0];
|
||||
var order = sortList[i][1];
|
||||
var s = (getCachedSortType(table.config.parsers, c) == "text") ? ((order == 0) ? "sortText" : "sortTextDesc") : ((order == 0) ? "sortNumeric" : "sortNumericDesc");
|
||||
var e = "e" + i;
|
||||
dynamicExp += "var " + e + " = " + s + "(a[" + c + "],b[" + c + "]); ";
|
||||
dynamicExp += "if(" + e + ") { return " + e + "; } ";
|
||||
dynamicExp += "else { ";
|
||||
}
|
||||
var orgOrderCol = cache.normalized[0].length - 1;
|
||||
dynamicExp += "return a[" + orgOrderCol + "]-b[" + orgOrderCol + "];";
|
||||
for (var i = 0; i < l; i++) {
|
||||
dynamicExp += "}; ";
|
||||
}
|
||||
dynamicExp += "return 0; ";
|
||||
dynamicExp += "}; ";
|
||||
eval(dynamicExp);
|
||||
cache.normalized.sort(sortWrapper);
|
||||
if (table.config.debug) {
|
||||
benchmark("Sorting on " + sortList.toString() + " and dir " + order + " time:", sortTime);
|
||||
}
|
||||
return cache;
|
||||
}
|
||||
|
||||
;
|
||||
|
||||
function sortText(a, b) { return ((a < b) ? -1 : ((a > b) ? 1 : 0)); }
|
||||
|
||||
;
|
||||
|
||||
function sortTextDesc(a, b) { return ((b < a) ? -1 : ((b > a) ? 1 : 0)); }
|
||||
|
||||
;
|
||||
|
||||
function sortNumeric(a, b) { return a - b; }
|
||||
|
||||
;
|
||||
|
||||
function sortNumericDesc(a, b) { return b - a; }
|
||||
|
||||
;
|
||||
|
||||
function getCachedSortType(parsers, i) { return parsers[i].type; }
|
||||
|
||||
;
|
||||
this.construct = function(settings) {
|
||||
return this.each(function() {
|
||||
if (!this.tHead || !this.tBodies) return;
|
||||
var $this, $document, $headers, cache, config, shiftDown = 0, sortOrder;
|
||||
this.config = {};
|
||||
config = $.extend(this.config, $.tablesorter.defaults, settings);
|
||||
$this = $(this);
|
||||
$headers = buildHeaders(this);
|
||||
this.config.parsers = buildParserCache(this, $headers);
|
||||
cache = buildCache(this);
|
||||
var sortCSS = [config.cssDesc, config.cssAsc];
|
||||
fixColumnWidth(this);
|
||||
$headers.click(function(e) {
|
||||
$this.trigger("sortStart");
|
||||
var totalRows = ($this[0].tBodies[0] && $this[0].tBodies[0].rows.length) || 0;
|
||||
if (!this.sortDisabled && totalRows > 0) {
|
||||
var $cell = $(this);
|
||||
var i = this.column;
|
||||
this.order = this.count++ % 2;
|
||||
if (!e[config.sortMultiSortKey]) {
|
||||
config.sortList = [];
|
||||
if (config.sortForce != null) {
|
||||
var a = config.sortForce;
|
||||
for (var j = 0; j < a.length; j++) {
|
||||
if (a[j][0] != i) {
|
||||
config.sortList.push(a[j]);
|
||||
}
|
||||
}
|
||||
}
|
||||
config.sortList.push([i, this.order]);
|
||||
}
|
||||
else {
|
||||
if (isValueInArray(i, config.sortList)) {
|
||||
for (var j = 0; j < config.sortList.length; j++) {
|
||||
var s = config.sortList[j], o = config.headerList[s[0]];
|
||||
if (s[0] == i) {
|
||||
o.count = s[1];
|
||||
o.count++;
|
||||
s[1] = o.count % 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
config.sortList.push([i, this.order]);
|
||||
}
|
||||
}
|
||||
;
|
||||
setTimeout(function() {
|
||||
setHeadersCss($this[0], $headers, config.sortList, sortCSS);
|
||||
appendToTable($this[0], multisort($this[0], config.sortList, cache));
|
||||
}, 1);
|
||||
return false;
|
||||
}
|
||||
}).mousedown(function() {
|
||||
if (config.cancelSelection) {
|
||||
this.onselectstart = function() { return false };
|
||||
return false;
|
||||
}
|
||||
});
|
||||
$this.bind("update", function() {
|
||||
this.config.parsers = buildParserCache(this, $headers);
|
||||
cache = buildCache(this);
|
||||
}).bind("sorton", function(e, list) {
|
||||
$(this).trigger("sortStart");
|
||||
config.sortList = list;
|
||||
var sortList = config.sortList;
|
||||
updateHeaderSortCount(this, sortList);
|
||||
setHeadersCss(this, $headers, sortList, sortCSS);
|
||||
appendToTable(this, multisort(this, sortList, cache));
|
||||
}).bind("appendCache", function() { appendToTable(this, cache); }).bind("applyWidgetId", function(e, id) { getWidgetById(id).format(this); }).bind("applyWidgets", function() { applyWidget(this); });
|
||||
if ($.metadata && ($(this).metadata() && $(this).metadata().sortlist)) {
|
||||
config.sortList = $(this).metadata().sortlist;
|
||||
}
|
||||
if (config.sortList.length > 0) {
|
||||
$this.trigger("sorton", [config.sortList]);
|
||||
}
|
||||
applyWidget(this);
|
||||
});
|
||||
};
|
||||
this.addParser = function(parser) {
|
||||
var l = parsers.length, a = true;
|
||||
for (var i = 0; i < l; i++) {
|
||||
if (parsers[i].id.toLowerCase() == parser.id.toLowerCase()) {
|
||||
a = false;
|
||||
}
|
||||
}
|
||||
if (a) {
|
||||
parsers.push(parser);
|
||||
}
|
||||
;
|
||||
};
|
||||
this.addWidget = function(widget) { widgets.push(widget); };
|
||||
this.formatFloat = function(s) {
|
||||
var i = parseFloat(s);
|
||||
return (isNaN(i)) ? 0 : i;
|
||||
};
|
||||
this.formatInt = function(s) {
|
||||
var i = parseInt(s);
|
||||
return (isNaN(i)) ? 0 : i;
|
||||
};
|
||||
this.isDigit = function(s, config) {
|
||||
var DECIMAL = '\\' + config.decimal;
|
||||
var exp = '/(^[+]?0(' + DECIMAL + '0+)?$)|(^([-+]?[1-9][0-9]*)$)|(^([-+]?((0?|[1-9][0-9]*)' + DECIMAL + '(0*[1-9][0-9]*)))$)|(^[-+]?[1-9]+[0-9]*' + DECIMAL + '0+$)/';
|
||||
return RegExp(exp).test($.trim(s));
|
||||
};
|
||||
this.clearTableBody = function(table) {
|
||||
if ($.browser.msie) {
|
||||
|
||||
function empty() { while (this.firstChild) this.removeChild(this.firstChild); }
|
||||
|
||||
empty.apply(table.tBodies[0]);
|
||||
}
|
||||
else {
|
||||
table.tBodies[0].innerHTML = "";
|
||||
}
|
||||
};
|
||||
}
|
||||
});
|
||||
$.fn.extend({ tablesorter: $.tablesorter.construct });
|
||||
var ts = $.tablesorter;
|
||||
ts.addParser({ id: "text", is: function(s) { return true; }, format: function(s) { return $.trim(s.toLowerCase()); }, type: "text" });
|
||||
ts.addParser({
|
||||
id: "digit",
|
||||
is: function(s, table) {
|
||||
var c = table.config;
|
||||
return $.tablesorter.isDigit(s, c);
|
||||
},
|
||||
format: function(s) { return $.tablesorter.formatFloat(s); },
|
||||
type: "numeric"
|
||||
});
|
||||
ts.addParser({ id: "currency", is: function(s) { return /^[£$€?.]/.test(s); }, format: function(s) { return $.tablesorter.formatFloat(s.replace(new RegExp(/[^0-9.]/g), "")); }, type: "numeric" });
|
||||
ts.addParser({
|
||||
id: "ipAddress", is: function(s) { return /^\d{2,3}[\.]\d{2,3}[\.]\d{2,3}[\.]\d{2,3}$/.test(s); },
|
||||
format: function(s) {
|
||||
var a = s.split("."), r = "", l = a.length;
|
||||
for (var i = 0; i < l; i++) {
|
||||
var item = a[i];
|
||||
if (item.length == 2) {
|
||||
r += "0" + item;
|
||||
}
|
||||
else {
|
||||
r += item;
|
||||
}
|
||||
}
|
||||
return $.tablesorter.formatFloat(r);
|
||||
},
|
||||
type: "numeric"
|
||||
});
|
||||
ts.addParser({ id: "url", is: function(s) { return /^(https?|ftp|file):\/\/$/.test(s); }, format: function(s) { return jQuery.trim(s.replace(new RegExp(/(https?|ftp|file):\/\//), '')); }, type: "text" });
|
||||
ts.addParser({ id: "isoDate", is: function(s) { return /^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(s); }, format: function(s) { return $.tablesorter.formatFloat((s != "") ? new Date(s.replace(new RegExp(/-/g), "/")).getTime() : "0"); }, type: "numeric" });
|
||||
ts.addParser({ id: "percent", is: function(s) { return /\%$/.test($.trim(s)); }, format: function(s) { return $.tablesorter.formatFloat(s.replace(new RegExp(/%/g), "")); }, type: "numeric" });
|
||||
ts.addParser({ id: "usLongDate", is: function(s) { return s.match(new RegExp(/^[A-Za-z]{3,10}\.? [0-9]{1,2}, ([0-9]{4}|'?[0-9]{2}) (([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(AM|PM)))$/)); }, format: function(s) { return $.tablesorter.formatFloat(new Date(s).getTime()); }, type: "numeric" });
|
||||
ts.addParser({
|
||||
id: "shortDate", is: function(s) { return /\d{1,2}[\/\-]\d{1,2}[\/\-]\d{2,4}/.test(s); },
|
||||
format: function(s, table) {
|
||||
var c = table.config;
|
||||
s = s.replace(/\-/g, "/");
|
||||
if (c.dateFormat == "us") {
|
||||
s = s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/, "$3/$1/$2");
|
||||
}
|
||||
else if (c.dateFormat == "uk") {
|
||||
s = s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/, "$3/$2/$1");
|
||||
}
|
||||
else if (c.dateFormat == "dd/mm/yy" || c.dateFormat == "dd-mm-yy") {
|
||||
s = s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{2})/, "$1/$2/$3");
|
||||
}
|
||||
return $.tablesorter.formatFloat(new Date(s).getTime());
|
||||
},
|
||||
type: "numeric"
|
||||
});
|
||||
ts.addParser({ id: "time", is: function(s) { return /^(([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(am|pm)))$/.test(s); }, format: function(s) { return $.tablesorter.formatFloat(new Date("2000/01/01 " + s).getTime()); }, type: "numeric" });
|
||||
ts.addParser({
|
||||
id: "metadata", is: function(s) { return false; },
|
||||
format: function(s, table, cell) {
|
||||
var c = table.config, p = (!c.parserMetadataName) ? 'sortValue' : c.parserMetadataName;
|
||||
return $(cell).metadata()[p];
|
||||
},
|
||||
type: "numeric"
|
||||
});
|
||||
ts.addWidget({
|
||||
id: "zebra",
|
||||
format: function(table) {
|
||||
if (table.config.debug) {
|
||||
var time = new Date();
|
||||
}
|
||||
$("tr:visible", table.tBodies[0]).filter(':even').removeClass(table.config.widgetZebra.css[1]).addClass(table.config.widgetZebra.css[0]).end().filter(':odd').removeClass(table.config.widgetZebra.css[0]).addClass(table.config.widgetZebra.css[1]);
|
||||
if (table.config.debug) {
|
||||
$.tablesorter.benchmark("Applying Zebra widget", time);
|
||||
}
|
||||
}
|
||||
});
|
||||
})(jQuery);
|
||||
@@ -1,353 +0,0 @@
|
||||
//
|
||||
// @author daemach
|
||||
//
|
||||
|
||||
daemach = function() {
|
||||
this.name = "Daemach's Toolbox";
|
||||
this.version = "2.0";
|
||||
this.debug = false;
|
||||
|
||||
// load extensions
|
||||
this.cw = new colorWeasel(this);
|
||||
this.cm = new cssMonkey(this);
|
||||
};
|
||||
|
||||
jQuery.extend(daemach, {
|
||||
prototype: {
|
||||
log: function() {
|
||||
if (!top.window.console || !top.window.console.log || !this.debug) {
|
||||
return;
|
||||
} else {
|
||||
top.window.console.log([].join.call(arguments, ''));
|
||||
};
|
||||
},
|
||||
time: function() {
|
||||
if (!top.window.console || !top.window.console.time || !this.debug) {
|
||||
return;
|
||||
} else {
|
||||
top.window.console.time([].join.call(arguments, ''));
|
||||
};
|
||||
},
|
||||
timeEnd: function() {
|
||||
if (!top.window.console || !top.window.console.timeEnd || !this.debug) {
|
||||
return;
|
||||
} else {
|
||||
top.window.console.timeEnd([].join.call(arguments, ''));
|
||||
};
|
||||
},
|
||||
profile: function() {
|
||||
if (!top.window.console || !top.window.console.profile || !this.debug) {
|
||||
return;
|
||||
} else {
|
||||
top.window.console.profile([].join.call(arguments, ''));
|
||||
};
|
||||
},
|
||||
profileEnd: function() {
|
||||
if (!top.window.console || !top.window.console.profileEnd || !this.debug) {
|
||||
return;
|
||||
} else {
|
||||
top.window.console.profileEnd([].join.call(arguments, ''));
|
||||
};
|
||||
},
|
||||
delay: function(condition, callback, scope, interval, done, i) {
|
||||
interval = interval || 15;
|
||||
if (typeof done === "undefined") {
|
||||
var done = false;
|
||||
i = setInterval(function() { $d.delay(condition, callback, scope, interval, done, i); }, interval)
|
||||
} else {
|
||||
var con = condition.apply(scope);
|
||||
console.log(con);
|
||||
if (con) {
|
||||
clearInterval(i);
|
||||
callback.call(scope);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
//
|
||||
// ==============================================================================================
|
||||
// ColorWeasel v1.4
|
||||
// ==============================================================================================
|
||||
//
|
||||
|
||||
colorWeasel = function(root) {
|
||||
this.name = "colorWeasel";
|
||||
this.version = "1.4";
|
||||
this.root = root;
|
||||
};
|
||||
jQuery.extend(colorWeasel, {
|
||||
prototype: {
|
||||
rgb2hsl: function(rgb) {
|
||||
rgb = this.rgb2hex(rgb);
|
||||
var r = parseInt(rgb.substr(0, 2), 16) / 255;
|
||||
var g = parseInt(rgb.substr(2, 2), 16) / 255;
|
||||
var b = parseInt(rgb.substr(4, 2), 16) / 255;
|
||||
var max = Math.max(r, g, b),
|
||||
min = Math.min(r, g, b),
|
||||
delta = (max - min),
|
||||
l = (max + min) / 2,
|
||||
h = 0,
|
||||
s = 0,
|
||||
dR, dG, dB;
|
||||
if (max != min) {
|
||||
s = (l < .5) ? (max - min) / (max + min) : (max - min) / (2 - max - min);
|
||||
dR = (((max - r) / 6) + (delta / 2)) / delta;
|
||||
dG = (((max - g) / 6) + (delta / 2)) / delta;
|
||||
dB = (((max - b) / 6) + (delta / 2)) / delta;
|
||||
h = (max != r) ? (max != g) ? ((2 / 3) + dG - dR) : ((1 / 3) + dR - dB) : (dB - dG);
|
||||
};
|
||||
if (h < 0) { h += 1; };
|
||||
if (h > 1) { h -= 1; };
|
||||
h *= 360;
|
||||
return [h, s, l];
|
||||
},
|
||||
hsl2rgb: function(h, s, l) { // H as degrees 0..360, S L as decimals, 0..1.
|
||||
if (typeof h == "object" && h.constructor == Array) {
|
||||
l = h[2];
|
||||
s = h[1];
|
||||
h = h[0];
|
||||
};
|
||||
h /= 360;
|
||||
var y = (l > .5) ? (l + s) - (l * s) : l * (s + 1),
|
||||
x = l * 2 - y,
|
||||
r = Math.round(255 * _hue2Rgb(x, y, h + (1 / 3))),
|
||||
g = Math.round(255 * _hue2Rgb(x, y, h)),
|
||||
b = Math.round(255 * _hue2Rgb(x, y, h - (1 / 3)));
|
||||
|
||||
function _hue2Rgb(x, y, h) {
|
||||
if (h < 0) {
|
||||
h += 1;
|
||||
} else if (h > 1) {
|
||||
h -= 1;
|
||||
};
|
||||
|
||||
return ((h * 6) < 1) ? (x + (y - x) * h * 6) : ((h * 2) < 1) ? y : ((h * 3) < 2) ? (x + (y - x) * ((2 / 3) - h) * 6) : x;
|
||||
}
|
||||
return this.zeroPad(r.toString(16)).toUpperCase() + this.zeroPad(g.toString(16)).toUpperCase() + this.zeroPad(b.toString(16)).toUpperCase();
|
||||
},
|
||||
zeroPad: function(num) {
|
||||
var str = '0' + num;
|
||||
return str.substring(str.length - 2);
|
||||
},
|
||||
rgb2hex: function(rgb) {
|
||||
if (!rgb.match(/(rgb\()[^\)]+(\))/)) {
|
||||
return rgb;
|
||||
};
|
||||
var t = /(rgb\()([^\)]+)(\))/.exec(rgb);
|
||||
t = t[2].replace(/\s+/g, "").split(",");
|
||||
var r = this.zeroPad(parseInt(t[0]).toString(16).toUpperCase());
|
||||
var g = this.zeroPad(parseInt(t[1]).toString(16).toUpperCase());
|
||||
var b = this.zeroPad(parseInt(t[2]).toString(16).toUpperCase());
|
||||
|
||||
return r + g + b;
|
||||
},
|
||||
ccLighter: function(rgb, perc) {
|
||||
var hsl = this.rgb2hsl(rgb);
|
||||
hsl[2] += (hsl[2] *= perc);
|
||||
hsl[2] = (hsl[2] >= 1) ? 1 : hsl[2];
|
||||
rgb = this.hsl2rgb(hsl);
|
||||
return rgb;
|
||||
},
|
||||
ccDarker: function(rgb, perc) {
|
||||
var hsl = this.rgb2hsl(rgb);
|
||||
hsl[2] -= (hsl[2] *= perc);
|
||||
hsl[2] = (hsl[2] <= 0) ? 0 : hsl[2];
|
||||
rgb = this.hsl2rgb(hsl);
|
||||
return rgb;
|
||||
},
|
||||
ccComplementary: function(rgb) {
|
||||
var hsl = this.rgb2hsl(rgb);
|
||||
hsl[0] += 180;
|
||||
hsl[0] = (hsl[0] > 360) ? hsl[0] - 360 : hsl[0];
|
||||
rgb = this.hsl2rgb(hsl);
|
||||
return rgb;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
//
|
||||
// ==============================================================================================
|
||||
// CSSMonkey v1.2
|
||||
// ==============================================================================================
|
||||
//
|
||||
|
||||
//
|
||||
// @author daemach
|
||||
//
|
||||
|
||||
cssMonkey = function(root) {
|
||||
this.name = "cssMonkey";
|
||||
this.version = "1.2";
|
||||
this.root = root;
|
||||
this.sheets = [];
|
||||
if (document.styleSheets) {
|
||||
this.parseStyles();
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
jQuery.extend(cssMonkey, {
|
||||
prototype: {
|
||||
parseStyles: function() {
|
||||
var media, mediaType, styleSheet;
|
||||
if (document.styleSheets.length > 0) {
|
||||
for (var i = 0; i < document.styleSheets.length; i++) {
|
||||
if (document.styleSheets[i].disabled) {
|
||||
continue;
|
||||
}
|
||||
media = document.styleSheets[i].media;
|
||||
mediaType = typeof media;
|
||||
|
||||
if (mediaType == "string") {
|
||||
if (media == "" || media.indexOf("screen") != -1) {
|
||||
styleSheet = document.styleSheets[i];
|
||||
}
|
||||
} else if (mediaType == "object") {
|
||||
if (media.mediaText == "" || media.mediaText.indexOf("screen") != -1) {
|
||||
styleSheet = document.styleSheets[i];
|
||||
}
|
||||
}
|
||||
if (typeof styleSheet != "undefined") {
|
||||
this.sheets.push(styleSheet);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
toggleSheet: function(disable, id) {
|
||||
var s = this.sheets;
|
||||
id = (typeof id === "undefined") ? null : id;
|
||||
disable = (typeof disable === "undefined") ? null : disable;
|
||||
|
||||
for (var i = 0; i < s.length; i++) {
|
||||
if (id === null || i == id || s[i].href.indexOf(id) >= 0) {
|
||||
s[i].disabled = (disable || (disable === null && !s[i].disabled)) ? true : false;
|
||||
}
|
||||
}
|
||||
},
|
||||
getRule: function(s, a) {
|
||||
var rules, matches = [], sObj = [];
|
||||
for (var i = this.sheets.length - 1; i >= 0; i--) {
|
||||
rules = (this.sheets[i].cssRules) ? this.sheets[i].cssRules : this.sheets[i].rules;
|
||||
if (!rules.length) {
|
||||
return matches;
|
||||
}
|
||||
s = s.toLowerCase();
|
||||
for (var r = rules.length - 1; r >= 0; r--) {
|
||||
if (typeof rules[r].selectorText != "undefined" && rules[r].selectorText.toLowerCase() == s) {
|
||||
a = (typeof a == "undefined") ? null : rules[r].style[this.camelCase(a)];
|
||||
matches.push([rules[r], i, r, a]);
|
||||
}
|
||||
}
|
||||
}
|
||||
return matches;
|
||||
},
|
||||
_findStyle: function(cssText, attr) {
|
||||
var n = (attr.indexOf(":") >= 0) ? attr.split(":")[0].trim() : attr;
|
||||
if (n.length) {
|
||||
for (var i = 0; i < cssText.length; i++) {
|
||||
if (cssText[i].indexOf(n) >= 0) { return i; }
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
},
|
||||
camelCase: function(s) {
|
||||
if (s == "float") { return "cssFloat"; };
|
||||
for (var str = /-([a-z])/; str.test(s); s = s.replace(str, RegExp.$1.toUpperCase()));
|
||||
return s;
|
||||
},
|
||||
getComputedStyle: function(ele, attr) {
|
||||
attr = this.camelCase(attr);
|
||||
if (ele.currentStyle) {
|
||||
return ele.currentStyle[attr];
|
||||
} else if (window.getComputedStyle) {
|
||||
return window.getComputedStyle(ele, null)[attr];
|
||||
}
|
||||
return null;
|
||||
},
|
||||
getRootStyle: function(ele, attr) {
|
||||
attr = this.camelCase(attr);
|
||||
var tmpAttr = this.getComputedStyle(ele, attr), tmpEle = ele;
|
||||
if (attr.indexOf("Color") >= 0) {
|
||||
tmpAttr = this.root.cw.rgb2hex(tmpAttr);
|
||||
while (tmpEle !== "body" && tmpAttr == "transparent") {
|
||||
tmpEle = tmpEle.parentNode;
|
||||
tmpAttr = this.root.cw.rgb2hex(this.getComputedStyle(tmpEle, attr));
|
||||
}
|
||||
tmpAttr = (tmpAttr == "transparent") ? "000000" : tmpAttr;
|
||||
}
|
||||
return tmpAttr;
|
||||
},
|
||||
setRule: function(selector, styles, index) {
|
||||
|
||||
var rules = this.getRule(selector), oCSS, nCSS, o, s, rCSS;
|
||||
if (rules.length) {
|
||||
nCSS = styles.split(";");
|
||||
if (!nCSS[nCSS.length - 1].trim().length) { nCSS.pop(); }
|
||||
for (var i = 0; i < rules.length; i++) {
|
||||
oCSS = rules[i][0].style.cssText.split(";");
|
||||
for (var x = 0; x < nCSS.length; x++) {
|
||||
s = this._findStyle(oCSS, nCSS[x]);
|
||||
if (s >= 0) {
|
||||
oCSS[s] = nCSS[x];
|
||||
} else {
|
||||
oCSS.push(nCSS[x]);
|
||||
}
|
||||
}
|
||||
rules[i][0].style.cssText = oCSS.join(";");
|
||||
}
|
||||
} else {
|
||||
var sheet = this.sheets[this.sheets.length - 1];
|
||||
var rules = sheet.cssRules ? sheet.cssRules : sheet.rules;
|
||||
if (index == undefined) {
|
||||
index = rules.length;
|
||||
}
|
||||
this._insertRule(sheet, selector, styles, index)
|
||||
}
|
||||
},
|
||||
_insertRule: function(sheet, selector, styles, index) {
|
||||
|
||||
if (sheet.insertRule) {
|
||||
sheet.insertRule(selector + "{" + styles + "}", index);
|
||||
} else if (sheet.addRule) {
|
||||
sheet.addRule(selector, styles, index);
|
||||
}
|
||||
},
|
||||
deleteRule: function(s) {
|
||||
var rules = this.getRule(s), sheet;
|
||||
for (var i = rules.length - 1; i >= 0; i--) {
|
||||
sheet = this.sheets[rules[i][1]];
|
||||
if (sheet.deleteRule) {
|
||||
sheet.deleteRule(rules[i][2]);
|
||||
} else if (sheet.removeRule) {
|
||||
sheet.removeRule(rules[i][2]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//
|
||||
// ==============================================================================================
|
||||
// Light it up...
|
||||
// ==============================================================================================
|
||||
//
|
||||
if (typeof $daemach == "undefined") {
|
||||
var $daemach = new daemach();
|
||||
}
|
||||
var $d = $daemach;
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 169 B |
|
Before Width: | Height: | Size: 73 B |
|
Before Width: | Height: | Size: 43 B |
|
Before Width: | Height: | Size: 162 B |
|
Before Width: | Height: | Size: 164 B |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 3.8 KiB |
@@ -1,102 +0,0 @@
|
||||
/// <reference path="../Application/NamespaceManager.js" />
|
||||
|
||||
Umbraco.Sys.registerNamespace('Umbraco.Controls');
|
||||
|
||||
Umbraco.Controls.TabView = (function () {
|
||||
var onChangeEvents = [];
|
||||
|
||||
var obj = {
|
||||
setActiveTab: function (tabviewid, tabid, tabs) {
|
||||
for (var i = 0; i < tabs.length; i++) {
|
||||
jQuery("#" + tabs[i]).attr("class", "tabOff");
|
||||
jQuery("#" + tabs[i] + "layer").hide();
|
||||
}
|
||||
|
||||
var activeTab = jQuery("#" + tabid).attr("class", "tabOn");
|
||||
jQuery("#" + tabid + "layer").show();
|
||||
jQuery("#" + tabviewid + '_activetab').val(tabid);
|
||||
|
||||
// show first tinymce toolbar
|
||||
jQuery(".tinymceMenuBar").hide();
|
||||
jQuery(document).ready(function () {
|
||||
jQuery("#" + tabid + "layer .tinymceMenuBar:first").show();
|
||||
});
|
||||
for (var i = 0; i < onChangeEvents.length; i++) {
|
||||
var fn = onChangeEvents[i];
|
||||
fn.apply(activeTab, [tabviewid, tabid, tabid]);
|
||||
}
|
||||
},
|
||||
|
||||
onActiveTabChange: function (fn) {
|
||||
onChangeEvents.push(fn);
|
||||
},
|
||||
|
||||
resizeTabViewTo: function (TabPageArr, TabViewName, tvHeight, tvWidth) {
|
||||
if (!tvHeight) {
|
||||
tvHeight = jQuery(window).height(); //getViewportHeight();
|
||||
if (document.location) {
|
||||
tvHeight = tvHeight - 10;
|
||||
}
|
||||
}
|
||||
if (!tvWidth) {
|
||||
tvWidth = jQuery(window).width(); // getViewportWidth();
|
||||
if (document.location) {
|
||||
tvWidth = tvWidth - 10;
|
||||
}
|
||||
}
|
||||
|
||||
var tabviewHeight = tvHeight - 12;
|
||||
|
||||
jQuery("#" + TabViewName).width(tvWidth);
|
||||
jQuery("#" + TabViewName).height(tabviewHeight);
|
||||
|
||||
|
||||
for (i = 0; i < TabPageArr.length; i++) {
|
||||
scrollwidth = tvWidth - 30;
|
||||
jQuery("#" + TabPageArr[i] + "layer_contentlayer").height((tabviewHeight - 67));
|
||||
|
||||
//document.getElementById(TabPageArr[i] +"layer_contentlayer").style.border = "2px solid #fff";
|
||||
|
||||
jQuery("#" + TabPageArr[i] + "layer_contentlayer").width((tvWidth - 2));
|
||||
jQuery("#" + TabPageArr[i] + "layer_menu").width((scrollwidth));
|
||||
jQuery("#" + TabPageArr[i] + "layer_menu_slh").width((scrollwidth));
|
||||
}
|
||||
},
|
||||
|
||||
tabSwitch: function (direction) {
|
||||
var preFix = "TabView1";
|
||||
var currentTab = jQuery("#" + preFix + "_activetab").val();
|
||||
|
||||
currentTab = currentTab.substr(preFix.length + 4, currentTab.length - preFix.length - 4);
|
||||
var nextTab = Math.round(currentTab) + direction;
|
||||
|
||||
if (nextTab < 10)
|
||||
nextTab = "0" + nextTab;
|
||||
|
||||
// Try to grab the next one!
|
||||
if (nextTab != "00") {
|
||||
if (jQuery("#" + preFix + '_tab' + nextTab) != null) {
|
||||
setActiveTab(preFix, preFix + '_tab' + nextTab, eval(preFix + '_tabs'));
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
return obj;
|
||||
})();
|
||||
|
||||
function setActiveTab(tabviewid, tabid, tabs) {
|
||||
Umbraco.Controls.TabView.setActiveTab(tabviewid, tabid, tabs);
|
||||
}
|
||||
|
||||
function resizeTabView(TabPageArr, TabViewName) {
|
||||
Umbraco.Controls.TabView.resizeTabViewTo(TabPageArr, TabViewName);
|
||||
}
|
||||
|
||||
function resizeTabViewTo(TabPageArr, TabViewName, tvHeight, tvWidth) {
|
||||
Umbraco.Controls.TabView.resizeTabViewTo(TabPageArr, TabViewName, tvHeight, tvWidth);
|
||||
}
|
||||
|
||||
function tabSwitch(direction) {
|
||||
Umbraco.Controls.TabView.tabSwitch(direction);
|
||||
}
|
||||
@@ -1,76 +0,0 @@
|
||||
.header {
|
||||
float:left;
|
||||
width:100%;
|
||||
background:#DAE0D2 url("bg.gif") repeat-x bottom;
|
||||
font-size:93%;
|
||||
line-height:normal;
|
||||
}
|
||||
.header ul {
|
||||
margin:0;
|
||||
padding:10px 10px 0;
|
||||
list-style:none;
|
||||
}
|
||||
|
||||
li.tabOff, li.tabOn {
|
||||
float:left;background:url("left_both.gif") no-repeat left top;
|
||||
margin:0;
|
||||
padding:0 0 0 9px;
|
||||
border-bottom:1px solid #765;
|
||||
color:#000;
|
||||
}
|
||||
|
||||
a.tabOff, a.tabOn {
|
||||
float:left;
|
||||
display:block;
|
||||
width:.1em;
|
||||
background:url("right_both.gif") no-repeat right top;
|
||||
padding:5px 15px 4px 6px;
|
||||
text-decoration:none;
|
||||
font-weight:bold;
|
||||
color:#765;
|
||||
}
|
||||
|
||||
.header > ul a {width:auto;}
|
||||
|
||||
#header a:hover {
|
||||
|
||||
color:#333;
|
||||
}
|
||||
|
||||
.header li:hover, .header li:hover a {
|
||||
background-position:0% -150px;
|
||||
color:#333;
|
||||
}
|
||||
|
||||
.header li:hover a {
|
||||
background-position:100% -150px;
|
||||
}
|
||||
|
||||
li.tabOn {
|
||||
background-position:0 -150px;
|
||||
border-width:0;
|
||||
}
|
||||
|
||||
li.tabOn a {
|
||||
background-position:100% -150px;
|
||||
padding-bottom:5px;
|
||||
color:#333;
|
||||
}
|
||||
.layer {
|
||||
display:none;
|
||||
}
|
||||
|
||||
.menubar {
|
||||
background:#F5F5F5;
|
||||
height:32px;
|
||||
width:100%;
|
||||
float:left;
|
||||
border-bottom:1px solid #919B9C;
|
||||
}
|
||||
|
||||
.tabpagecontainer {
|
||||
border-bottom:1px solid #919B9C;
|
||||
border-left:1px solid #919B9C;
|
||||
border-right:1px solid #919B9C;
|
||||
height:99%;
|
||||
}
|
||||
@@ -1,130 +0,0 @@
|
||||
.header {
|
||||
float:left;
|
||||
width:100%;
|
||||
background: #fff url(images/bg.gif) repeat-x bottom;
|
||||
font-size:11px;
|
||||
line-height:normal;
|
||||
font-family: "Trebuchet MS", verdana, arial;
|
||||
font-size: 11px;
|
||||
font-weight: normal;
|
||||
|
||||
}
|
||||
.header ul {
|
||||
margin:0;
|
||||
padding:0px 0px 0;
|
||||
list-style:none;
|
||||
}
|
||||
.header li {
|
||||
display:inline;
|
||||
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
.header a {
|
||||
float:left;
|
||||
background:url(images/left_both.gif) no-repeat left top;
|
||||
margin:0;
|
||||
padding:0 0 0 9px;
|
||||
border-bottom:1px solid #CAC9C9;
|
||||
text-decoration:none;
|
||||
outline: none;
|
||||
}
|
||||
.header a span {
|
||||
float:left;
|
||||
display:block;
|
||||
background:url(images/right_both.gif) no-repeat right top;
|
||||
padding:4px 15px 0px 6px;
|
||||
font-weight:bold;
|
||||
color:#65787A;
|
||||
}
|
||||
|
||||
/* Commented Backslash Hack hides rule from IE5-Mac \*/
|
||||
.header a span {
|
||||
float:none;
|
||||
|
||||
}
|
||||
/* End IE5-Mac hack */
|
||||
|
||||
.header a:hover span {
|
||||
color:#333;
|
||||
}
|
||||
|
||||
.header a:hover {
|
||||
background-position:0% -150px;
|
||||
|
||||
}
|
||||
|
||||
.header a:hover span {
|
||||
background-position:100% -150px;
|
||||
}
|
||||
|
||||
.header ul li.tabOn a {
|
||||
background-position:0 -150px;
|
||||
border-width:0;
|
||||
}
|
||||
|
||||
.header ul li.tabOn a span {
|
||||
background-position:100% -150px;
|
||||
padding-bottom:1px;
|
||||
color:#333;
|
||||
}
|
||||
|
||||
.tabpage
|
||||
{
|
||||
display: none;
|
||||
background:#ffffff;
|
||||
padding: 0px; margin: 0px;
|
||||
clear:both;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
|
||||
.tabpagescrollinglayer
|
||||
{
|
||||
clear:both;
|
||||
overflow: auto;
|
||||
padding: 0px; margin: 0px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
|
||||
.tabpagescrollinglayer .tabpageContent{margin: 0px; padding: 0px 10px 0px 10px;}
|
||||
|
||||
.menubar {
|
||||
background-image: url(../tabView/images/background.gif);
|
||||
height:32px;
|
||||
width: auto;
|
||||
display: block;
|
||||
border-bottom:1px solid #CAC9C9;
|
||||
padding: 0px; margin: 0px;
|
||||
}
|
||||
|
||||
.tabpagecontainer {
|
||||
border-left:1px solid #CAC9C9;
|
||||
border-right:1px solid #CAC9C9;
|
||||
}
|
||||
|
||||
.tabOff .mceEditorContainer{display: none !Important;}
|
||||
|
||||
.footer {
|
||||
height: 12px;
|
||||
margin: 0;
|
||||
padding: 0px;
|
||||
background: url(images/footer_bg.gif) 11px 11px repeat-x #fff;
|
||||
overflow: hidden;
|
||||
clear: both;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.footer .status h2 {
|
||||
margin: 0px;
|
||||
font-weight: bold;
|
||||
text-align: left;
|
||||
font-family: "Trebuchet MS", verdana, arial;
|
||||
font-size: 10px; color: #378080;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.footer .status{height: 12px; margin: 0px; overflow: hidden; background: url(images/footer_statusBar_bg.gif) top left no-repeat;}
|
||||
.footer .status h2{display: block; height: 12px; overflow: hidden; margin: 0px; padding: 0px; background: url(images/footer_statusBar_h2_bg.gif) top right no-repeat;}
|
||||