sync handler merge
|
|
@ -4,7 +4,7 @@
|
|||
<title>ERPNext</title>
|
||||
{{ ajax_meta_tag }}
|
||||
<meta name="author" content="">
|
||||
<script type="text/javascript" src="lib/js/lib/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="lib/js/lib/jquery/jquery.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
// browser support
|
||||
if(($.browser.mozilla && parseFloat($.browser.version)<4) ||
|
||||
|
|
|
|||
735
css/Aristo/Aristo.css
Executable file
|
|
@ -0,0 +1,735 @@
|
|||
/*
|
||||
* jQuery UI CSS Framework 1.8.7
|
||||
*
|
||||
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Theming/API
|
||||
*/
|
||||
|
||||
/* Layout helpers
|
||||
----------------------------------*/
|
||||
.ui-helper-hidden { display: none; }
|
||||
.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
|
||||
.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
|
||||
.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
|
||||
.ui-helper-clearfix { display: inline-block; }
|
||||
/* required comment for clearfix to work in Opera \*/
|
||||
* html .ui-helper-clearfix { height:1%; }
|
||||
.ui-helper-clearfix { display:block; }
|
||||
/* end clearfix */
|
||||
.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
|
||||
|
||||
|
||||
/* Interaction Cues
|
||||
----------------------------------*/
|
||||
.ui-state-disabled { cursor: default !important; }
|
||||
|
||||
|
||||
/* Icons
|
||||
----------------------------------*/
|
||||
|
||||
/* states and images */
|
||||
.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
|
||||
|
||||
|
||||
/* Misc visuals
|
||||
----------------------------------*/
|
||||
|
||||
/* Overlays */
|
||||
.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
|
||||
|
||||
|
||||
/*
|
||||
* jQuery UI CSS Framework 1.8.7
|
||||
*
|
||||
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Theming/API
|
||||
*
|
||||
* To view and modify this theme, visit http://jqueryui.com/themeroller/?ctl=themeroller
|
||||
*/
|
||||
|
||||
|
||||
/* Component containers
|
||||
----------------------------------*/
|
||||
.ui-widget { font-family: Arial,sans-serif; font-size: 1.1em; }
|
||||
.ui-widget .ui-widget { font-size: 1em; }
|
||||
.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Arial,sans-serif; font-size: 1em; }
|
||||
.ui-widget-content { border: 1px solid #B6B6B6; background: #ffffff; color: #4F4F4F; }
|
||||
.ui-widget-content a { color: #4F4F4F; }
|
||||
.ui-widget-header { border: 1px solid #B6B6B6; color: #4F4F4F; font-weight: bold; }
|
||||
.ui-widget-header {
|
||||
background: #ededed url(../lib/css/Aristo/images/bg_fallback.png) 0 0 repeat-x; /* Old browsers */
|
||||
background: -moz-linear-gradient(top, #ededed 0%, #c4c4c4 100%); /* FF3.6+ */
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ededed), color-stop(100%,#c4c4c4)); /* Chrome,Safari4+ */
|
||||
background: -webkit-linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* Chrome10+,Safari5.1+ */
|
||||
background: -o-linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* Opera11.10+ */
|
||||
background: -ms-linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* IE10+ */
|
||||
background: linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* W3C */
|
||||
}
|
||||
.ui-widget-header a { color: #4F4F4F; }
|
||||
|
||||
/* Interaction states
|
||||
----------------------------------*/
|
||||
.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #B6B6B6; font-weight: normal; color: #4F4F4F; }
|
||||
.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default {
|
||||
background: #ededed url(../lib/css/Aristo/images/bg_fallback.png) 0 0 repeat-x; /* Old browsers */
|
||||
background: -moz-linear-gradient(top, #ededed 0%, #c4c4c4 100%); /* FF3.6+ */
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ededed), color-stop(100%,#c4c4c4)); /* Chrome,Safari4+ */
|
||||
background: -webkit-linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* Chrome10+,Safari5.1+ */
|
||||
background: -o-linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* Opera11.10+ */
|
||||
background: -ms-linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* IE10+ */
|
||||
background: linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* W3C */
|
||||
-webkit-box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset;
|
||||
-moz-box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset;
|
||||
box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset;
|
||||
}
|
||||
.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #4F4F4F; text-decoration: none; }
|
||||
.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #9D9D9D; font-weight: normal; color: #313131; }
|
||||
.ui-state-hover a, .ui-state-hover a:hover { color: #313131; text-decoration: none; }
|
||||
.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active {
|
||||
outline: none;
|
||||
color: #1c4257; border: 1px solid #7096ab;
|
||||
background: #ededed url(../lib/css/Aristo/images/bg_fallback.png) 0 -50px repeat-x; /* Old browsers */
|
||||
background: -moz-linear-gradient(top, #b9e0f5 0%, #92bdd6 100%); /* FF3.6+ */
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#b9e0f5), color-stop(100%,#92bdd6)); /* Chrome,Safari4+ */
|
||||
background: -webkit-linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* Chrome10+,Safari5.1+ */
|
||||
background: -o-linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* Opera11.10+ */
|
||||
background: -ms-linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* IE10+ */
|
||||
background: linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* W3C */
|
||||
-webkit-box-shadow: none;
|
||||
-moz-box-shadow: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #313131; text-decoration: none; }
|
||||
.ui-widget :active { outline: none; }
|
||||
|
||||
/* Interaction Cues
|
||||
----------------------------------*/
|
||||
.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight { border: 1px solid #d2dbf4; background: #f4f8fd; color: #0d2054; -moz-border-radius: 0 !important; -webkit-border-radius: 0 !important; border-radius: 0 !important; }
|
||||
.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
|
||||
.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error { border: 1px solid #e2d0d0; background: #fcf0f0; color: #280b0b; -moz-border-radius: 0 !important; -webkit-border-radius: 0 !important; border-radius: 0 !important; }
|
||||
.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a; }
|
||||
.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a; }
|
||||
.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
|
||||
.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
|
||||
.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
|
||||
|
||||
/* Icons
|
||||
----------------------------------*/
|
||||
|
||||
/* states and images */
|
||||
.ui-icon { width: 16px; height: 16px; background-image: url(../lib/css/Aristo/images/ui-icons_222222_256x240.png); }
|
||||
.ui-widget-content .ui-icon {background-image: url(../lib/css/Aristo/images/ui-icons_222222_256x240.png); }
|
||||
.ui-widget-header .ui-icon {background-image: url(../lib/css/Aristo/images/ui-icons_222222_256x240.png); }
|
||||
.ui-state-default .ui-icon { background-image: url(../lib/css/Aristo/images/ui-icons_454545_256x240.png); }
|
||||
.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(../lib/css/Aristo/images/ui-icons_454545_256x240.png); }
|
||||
.ui-state-active .ui-icon {background-image: url(../lib/css/Aristo/images/ui-icons_454545_256x240.png); }
|
||||
.ui-state-highlight .ui-icon {background-image: url(../lib/css/Aristo/images/ui-icons_454545_256x240.png); }
|
||||
.ui-state-error .ui-icon, .ui-state-error-text .ui-icon { background: url(../lib/css/Aristo/images/icon_sprite.png) -16px 0 no-repeat !important; }
|
||||
.ui-state-highlight .ui-icon, .ui-state-error .ui-icon { margin-top: -1px; }
|
||||
|
||||
/* positioning */
|
||||
.ui-icon-carat-1-n { background-position: 0 0; }
|
||||
.ui-icon-carat-1-ne { background-position: -16px 0; }
|
||||
.ui-icon-carat-1-e { background-position: -32px 0; }
|
||||
.ui-icon-carat-1-se { background-position: -48px 0; }
|
||||
.ui-icon-carat-1-s { background-position: -64px 0; }
|
||||
.ui-icon-carat-1-sw { background-position: -80px 0; }
|
||||
.ui-icon-carat-1-w { background-position: -96px 0; }
|
||||
.ui-icon-carat-1-nw { background-position: -112px 0; }
|
||||
.ui-icon-carat-2-n-s { background-position: -128px 0; }
|
||||
.ui-icon-carat-2-e-w { background-position: -144px 0; }
|
||||
.ui-icon-triangle-1-n { background-position: 0 -16px; }
|
||||
.ui-icon-triangle-1-ne { background-position: -16px -16px; }
|
||||
.ui-icon-triangle-1-e { background-position: -32px -16px; }
|
||||
.ui-icon-triangle-1-se { background-position: -48px -16px; }
|
||||
.ui-icon-triangle-1-s { background-position: -64px -16px; }
|
||||
.ui-icon-triangle-1-sw { background-position: -80px -16px; }
|
||||
.ui-icon-triangle-1-w { background-position: -96px -16px; }
|
||||
.ui-icon-triangle-1-nw { background-position: -112px -16px; }
|
||||
.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
|
||||
.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
|
||||
.ui-icon-arrow-1-n { background-position: 0 -32px; }
|
||||
.ui-icon-arrow-1-ne { background-position: -16px -32px; }
|
||||
.ui-icon-arrow-1-e { background-position: -32px -32px; }
|
||||
.ui-icon-arrow-1-se { background-position: -48px -32px; }
|
||||
.ui-icon-arrow-1-s { background-position: -64px -32px; }
|
||||
.ui-icon-arrow-1-sw { background-position: -80px -32px; }
|
||||
.ui-icon-arrow-1-w { background-position: -96px -32px; }
|
||||
.ui-icon-arrow-1-nw { background-position: -112px -32px; }
|
||||
.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
|
||||
.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
|
||||
.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
|
||||
.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
|
||||
.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
|
||||
.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
|
||||
.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
|
||||
.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
|
||||
.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
|
||||
.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
|
||||
.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
|
||||
.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
|
||||
.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
|
||||
.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
|
||||
.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
|
||||
.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
|
||||
.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
|
||||
.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
|
||||
.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
|
||||
.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
|
||||
.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
|
||||
.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
|
||||
.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
|
||||
.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
|
||||
.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
|
||||
.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
|
||||
.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
|
||||
.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
|
||||
.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
|
||||
.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
|
||||
.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
|
||||
.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
|
||||
.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
|
||||
.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
|
||||
.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
|
||||
.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
|
||||
.ui-icon-arrow-4 { background-position: 0 -80px; }
|
||||
.ui-icon-arrow-4-diag { background-position: -16px -80px; }
|
||||
.ui-icon-extlink { background-position: -32px -80px; }
|
||||
.ui-icon-newwin { background-position: -48px -80px; }
|
||||
.ui-icon-refresh { background-position: -64px -80px; }
|
||||
.ui-icon-shuffle { background-position: -80px -80px; }
|
||||
.ui-icon-transfer-e-w { background-position: -96px -80px; }
|
||||
.ui-icon-transferthick-e-w { background-position: -112px -80px; }
|
||||
.ui-icon-folder-collapsed { background-position: 0 -96px; }
|
||||
.ui-icon-folder-open { background-position: -16px -96px; }
|
||||
.ui-icon-document { background-position: -32px -96px; }
|
||||
.ui-icon-document-b { background-position: -48px -96px; }
|
||||
.ui-icon-note { background-position: -64px -96px; }
|
||||
.ui-icon-mail-closed { background-position: -80px -96px; }
|
||||
.ui-icon-mail-open { background-position: -96px -96px; }
|
||||
.ui-icon-suitcase { background-position: -112px -96px; }
|
||||
.ui-icon-comment { background-position: -128px -96px; }
|
||||
.ui-icon-person { background-position: -144px -96px; }
|
||||
.ui-icon-print { background-position: -160px -96px; }
|
||||
.ui-icon-trash { background-position: -176px -96px; }
|
||||
.ui-icon-locked { background-position: -192px -96px; }
|
||||
.ui-icon-unlocked { background-position: -208px -96px; }
|
||||
.ui-icon-bookmark { background-position: -224px -96px; }
|
||||
.ui-icon-tag { background-position: -240px -96px; }
|
||||
.ui-icon-home { background-position: 0 -112px; }
|
||||
.ui-icon-flag { background-position: -16px -112px; }
|
||||
.ui-icon-calendar { background-position: -32px -112px; }
|
||||
.ui-icon-cart { background-position: -48px -112px; }
|
||||
.ui-icon-pencil { background-position: -64px -112px; }
|
||||
.ui-icon-clock { background-position: -80px -112px; }
|
||||
.ui-icon-disk { background-position: -96px -112px; }
|
||||
.ui-icon-calculator { background-position: -112px -112px; }
|
||||
.ui-icon-zoomin { background-position: -128px -112px; }
|
||||
.ui-icon-zoomout { background-position: -144px -112px; }
|
||||
.ui-icon-search { background-position: -160px -112px; }
|
||||
.ui-icon-wrench { background-position: -176px -112px; }
|
||||
.ui-icon-gear { background-position: -192px -112px; }
|
||||
.ui-icon-heart { background-position: -208px -112px; }
|
||||
.ui-icon-star { background-position: -224px -112px; }
|
||||
.ui-icon-link { background-position: -240px -112px; }
|
||||
.ui-icon-cancel { background-position: 0 -128px; }
|
||||
.ui-icon-plus { background-position: -16px -128px; }
|
||||
.ui-icon-plusthick { background-position: -32px -128px; }
|
||||
.ui-icon-minus { background-position: -48px -128px; }
|
||||
.ui-icon-minusthick { background-position: -64px -128px; }
|
||||
.ui-icon-close { background-position: -80px -128px; }
|
||||
.ui-icon-closethick { background-position: -96px -128px; }
|
||||
.ui-icon-key { background-position: -112px -128px; }
|
||||
.ui-icon-lightbulb { background-position: -128px -128px; }
|
||||
.ui-icon-scissors { background-position: -144px -128px; }
|
||||
.ui-icon-clipboard { background-position: -160px -128px; }
|
||||
.ui-icon-copy { background-position: -176px -128px; }
|
||||
.ui-icon-contact { background-position: -192px -128px; }
|
||||
.ui-icon-image { background-position: -208px -128px; }
|
||||
.ui-icon-video { background-position: -224px -128px; }
|
||||
.ui-icon-script { background-position: -240px -128px; }
|
||||
.ui-icon-alert { background-position: 0 -144px; }
|
||||
.ui-icon-info { background: url(../lib/css/Aristo/images/icon_sprite.png) 0 0 no-repeat !important; }
|
||||
.ui-icon-notice { background-position: -32px -144px; }
|
||||
.ui-icon-help { background-position: -48px -144px; }
|
||||
.ui-icon-check { background-position: -64px -144px; }
|
||||
.ui-icon-bullet { background-position: -80px -144px; }
|
||||
.ui-icon-radio-off { background-position: -96px -144px; }
|
||||
.ui-icon-radio-on { background-position: -112px -144px; }
|
||||
.ui-icon-pin-w { background-position: -128px -144px; }
|
||||
.ui-icon-pin-s { background-position: -144px -144px; }
|
||||
.ui-icon-play { background-position: 0 -160px; }
|
||||
.ui-icon-pause { background-position: -16px -160px; }
|
||||
.ui-icon-seek-next { background-position: -32px -160px; }
|
||||
.ui-icon-seek-prev { background-position: -48px -160px; }
|
||||
.ui-icon-seek-end { background-position: -64px -160px; }
|
||||
.ui-icon-seek-start { background-position: -80px -160px; }
|
||||
/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
|
||||
.ui-icon-seek-first { background-position: -80px -160px; }
|
||||
.ui-icon-stop { background-position: -96px -160px; }
|
||||
.ui-icon-eject { background-position: -112px -160px; }
|
||||
.ui-icon-volume-off { background-position: -128px -160px; }
|
||||
.ui-icon-volume-on { background-position: -144px -160px; }
|
||||
.ui-icon-power { background-position: 0 -176px; }
|
||||
.ui-icon-signal-diag { background-position: -16px -176px; }
|
||||
.ui-icon-signal { background-position: -32px -176px; }
|
||||
.ui-icon-battery-0 { background-position: -48px -176px; }
|
||||
.ui-icon-battery-1 { background-position: -64px -176px; }
|
||||
.ui-icon-battery-2 { background-position: -80px -176px; }
|
||||
.ui-icon-battery-3 { background-position: -96px -176px; }
|
||||
.ui-icon-circle-plus { background-position: 0 -192px; }
|
||||
.ui-icon-circle-minus { background-position: -16px -192px; }
|
||||
.ui-icon-circle-close { background-position: -32px -192px; }
|
||||
.ui-icon-circle-triangle-e { background-position: -48px -192px; }
|
||||
.ui-icon-circle-triangle-s { background-position: -64px -192px; }
|
||||
.ui-icon-circle-triangle-w { background-position: -80px -192px; }
|
||||
.ui-icon-circle-triangle-n { background-position: -96px -192px; }
|
||||
.ui-icon-circle-arrow-e { background-position: -112px -192px; }
|
||||
.ui-icon-circle-arrow-s { background-position: -128px -192px; }
|
||||
.ui-icon-circle-arrow-w { background-position: -144px -192px; }
|
||||
.ui-icon-circle-arrow-n { background-position: -160px -192px; }
|
||||
.ui-icon-circle-zoomin { background-position: -176px -192px; }
|
||||
.ui-icon-circle-zoomout { background-position: -192px -192px; }
|
||||
.ui-icon-circle-check { background-position: -208px -192px; }
|
||||
.ui-icon-circlesmall-plus { background-position: 0 -208px; }
|
||||
.ui-icon-circlesmall-minus { background-position: -16px -208px; }
|
||||
.ui-icon-circlesmall-close { background-position: -32px -208px; }
|
||||
.ui-icon-squaresmall-plus { background-position: -48px -208px; }
|
||||
.ui-icon-squaresmall-minus { background-position: -64px -208px; }
|
||||
.ui-icon-squaresmall-close { background-position: -80px -208px; }
|
||||
.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
|
||||
.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
|
||||
.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
|
||||
.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
|
||||
.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
|
||||
.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
|
||||
|
||||
|
||||
/* Misc visuals
|
||||
----------------------------------*/
|
||||
|
||||
/* Corner radius */
|
||||
.ui-corner-tl { -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; border-top-left-radius: 3px; }
|
||||
.ui-corner-tr { -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 3px; border-top-right-radius: 3px; }
|
||||
.ui-corner-bl { -moz-border-radius-bottomleft: 3px; -webkit-border-bottom-left-radius: 3px; border-bottom-left-radius: 3px; }
|
||||
.ui-corner-br { -moz-border-radius-bottomright: 3px; -webkit-border-bottom-right-radius: 3px; border-bottom-right-radius: 3px; }
|
||||
.ui-corner-top { -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; border-top-left-radius: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 3px; border-top-right-radius: 3px; }
|
||||
.ui-corner-bottom { -moz-border-radius-bottomleft: 3px; -webkit-border-bottom-left-radius: 3px; border-bottom-left-radius: 3px; -moz-border-radius-bottomright: 3px; -webkit-border-bottom-right-radius: 3px; border-bottom-right-radius: 3px; }
|
||||
.ui-corner-right { -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 3px; border-top-right-radius: 3px; -moz-border-radius-bottomright: 3px; -webkit-border-bottom-right-radius: 3px; border-bottom-right-radius: 3px; }
|
||||
.ui-corner-left { -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; border-top-left-radius: 3px; -moz-border-radius-bottomleft: 3px; -webkit-border-bottom-left-radius: 3px; border-bottom-left-radius: 3px; }
|
||||
.ui-corner-all { -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; }
|
||||
|
||||
/* Overlays */
|
||||
.ui-widget-overlay { background: #262b33; opacity: .70;filter:Alpha(Opacity=70); }
|
||||
.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #000000; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }/*
|
||||
* jQuery UI Resizable 1.8.7
|
||||
*
|
||||
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Resizable#theming
|
||||
*/
|
||||
.ui-resizable { position: relative;}
|
||||
.ui-resizable-handle { position: absolute; font-size: 0.1px; z-index: 999; display: block;}
|
||||
.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
|
||||
.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; }
|
||||
.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; }
|
||||
.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; }
|
||||
.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; }
|
||||
.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
|
||||
.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
|
||||
.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
|
||||
.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/*
|
||||
* jQuery UI Selectable 1.8.7
|
||||
*
|
||||
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Selectable#theming
|
||||
*/
|
||||
.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; }
|
||||
/*
|
||||
* jQuery UI Accordion 1.8.7
|
||||
*
|
||||
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Accordion#theming
|
||||
*/
|
||||
/* IE/Win - Fix animation bug - #4615 */
|
||||
.ui-accordion { width: 100%; }
|
||||
.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; }
|
||||
.ui-accordion .ui-accordion-header, .ui-accordion .ui-accordion-content { -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0; }
|
||||
.ui-accordion .ui-accordion-li-fix { display: inline; }
|
||||
.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }
|
||||
.ui-accordion .ui-accordion-header a { display: block; font-size: 12px; font-weight: bold; padding: .5em .5em .5em .7em; }
|
||||
.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; }
|
||||
.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
|
||||
.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; }
|
||||
.ui-accordion .ui-accordion-content-active { display: block; }/*
|
||||
* jQuery UI Autocomplete 1.8.7
|
||||
*
|
||||
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Autocomplete#theming
|
||||
*/
|
||||
.ui-autocomplete {
|
||||
position: absolute; cursor: default; z-index: 3;
|
||||
-moz-border-radius: 0;
|
||||
-webkit-border-radius: 0;
|
||||
border-radius: 0;
|
||||
-moz-box-shadow: 0 1px 5px rgba(0,0,0,0.3);
|
||||
-webkit-box-shadow: 0 1px 5px rgba(0,0,0,0.3);
|
||||
box-shadow: 0 1px 5px rgba(0,0,0,0.3);
|
||||
}
|
||||
|
||||
/* workarounds */
|
||||
* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
|
||||
|
||||
/*
|
||||
* jQuery UI Menu 1.8.7
|
||||
*
|
||||
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Menu#theming
|
||||
*/
|
||||
.ui-menu {
|
||||
list-style:none;
|
||||
padding: 2px;
|
||||
margin: 0;
|
||||
display:block;
|
||||
float: left;
|
||||
}
|
||||
.ui-menu .ui-menu {
|
||||
margin-top: -3px;
|
||||
}
|
||||
.ui-menu .ui-menu-item {
|
||||
margin:0;
|
||||
padding: 0;
|
||||
zoom: 1;
|
||||
float: left;
|
||||
clear: left;
|
||||
width: 100%;
|
||||
}
|
||||
.ui-menu .ui-menu-item a {
|
||||
text-decoration:none;
|
||||
display:block;
|
||||
padding:.2em .4em;
|
||||
line-height:1.5;
|
||||
zoom:1;
|
||||
}
|
||||
.ui-menu .ui-menu-item a.ui-state-hover,
|
||||
.ui-menu .ui-menu-item a.ui-state-active {
|
||||
font-weight: normal;
|
||||
margin: -1px;
|
||||
background: #5f83b9;
|
||||
color: #FFFFFF;
|
||||
text-shadow: 0px 1px 1px #234386;
|
||||
border-color: #466086;
|
||||
-moz-border-radius: 0;
|
||||
-webkit-border-radius: 0;
|
||||
border-radius: 0;
|
||||
}
|
||||
/*
|
||||
* jQuery UI Button 1.8.7
|
||||
*
|
||||
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Button#theming
|
||||
*/
|
||||
.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; -webkit-user-select: none; -moz-user-select: none; user-select: none; } /* the overflow property removes extra width in IE */
|
||||
.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
|
||||
button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */
|
||||
.ui-button-icons-only { width: 3.4em; }
|
||||
button.ui-button-icons-only { width: 3.7em; }
|
||||
|
||||
/* button animation properties */
|
||||
.ui-button {
|
||||
-webkit-transition: -webkit-box-shadow 0.25s ease-in-out;
|
||||
-moz-transition: -moz-box-shadow 0.25s ease-in-out;
|
||||
-o-transition: -o-box-shadow 0.25s ease-in-out;
|
||||
}
|
||||
|
||||
/*states*/
|
||||
.ui-button.ui-state-hover {
|
||||
-moz-box-shadow: 0 0 8px rgba(0, 0, 0, 0.15), 0 1px 0 rgba(255,255,255,0.8) inset;
|
||||
-webkit-box-shadow: 0 0 8px rgba(0, 0, 0, 0.15), 0 1px 0 rgba(255,255,255,0.8) inset;
|
||||
box-shadow: 0 0 8px rgba(0, 0, 0, 0.15), 0 1px 0 rgba(255,255,255,0.8) inset;
|
||||
}
|
||||
.ui-button.ui-state-focus {
|
||||
outline: none;
|
||||
color: #1c4257;
|
||||
border-color: #7096ab;
|
||||
background: #ededed url(../lib/css/Aristo/images/bg_fallback.png) 0 -50px repeat-x; /* Old browsers */
|
||||
background: -moz-linear-gradient(top, #b9e0f5 0%, #92bdd6 100%); /* FF3.6+ */
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#b9e0f5), color-stop(100%,#92bdd6)); /* Chrome,Safari4+ */
|
||||
background: -webkit-linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* Chrome10+,Safari5.1+ */
|
||||
background: -o-linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* Opera11.10+ */
|
||||
background: -ms-linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* IE10+ */
|
||||
background: linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* W3C */
|
||||
-moz-box-shadow: 0 0 8px rgba(0, 0, 0, 0.15), 0 1px 0 rgba(255,255,255,0.8) inset;
|
||||
-webkit-box-shadow: 0 0 8px rgba(0, 0, 0, 0.15), 0 1px 0 rgba(255,255,255,0.8) inset;
|
||||
box-shadow: 0 0 8px rgba(0, 0, 0, 0.15), 0 1px 0 rgba(255,255,255,0.8) inset;
|
||||
}
|
||||
|
||||
/*button text element */
|
||||
.ui-button .ui-button-text { display: block; line-height: 1.4; font-size: 14px; font-weight: bold; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6); }
|
||||
.ui-button-text-only .ui-button-text { padding: .4em 1em; }
|
||||
.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; }
|
||||
.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }
|
||||
.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; }
|
||||
.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; }
|
||||
/* no icon support for input elements, provide padding by default */
|
||||
input.ui-button { font-size: 14px; font-weight: bold; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6); padding: 0 1em !important; height: 33px; }
|
||||
/*remove submit button internal padding in Firefox*/
|
||||
input.ui-button::-moz-focus-inner {
|
||||
border: 0;
|
||||
padding: 0;
|
||||
}
|
||||
/* fix webkits handling of the box model */
|
||||
@media screen and (-webkit-min-device-pixel-ratio:0) {
|
||||
input.ui-button {
|
||||
height: 31px !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*button icon element(s) */
|
||||
.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; }
|
||||
.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }
|
||||
.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }
|
||||
.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
|
||||
.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
|
||||
|
||||
/*button sets*/
|
||||
.ui-buttonset { margin-right: 7px; }
|
||||
.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; }
|
||||
.ui-buttonset .ui-button.ui-state-active { color: #1c4257; border-color: #7096ab; }
|
||||
.ui-buttonset .ui-button.ui-state-active {
|
||||
background: #ededed url(../lib/css/Aristo/images/bg_fallback.png) 0 -50px repeat-x; /* Old browsers */
|
||||
background: -moz-linear-gradient(top, #b9e0f5 0%, #92bdd6 100%); /* FF3.6+ */
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#b9e0f5), color-stop(100%,#92bdd6)); /* Chrome,Safari4+ */
|
||||
background: -webkit-linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* Chrome10+,Safari5.1+ */
|
||||
background: -o-linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* Opera11.10+ */
|
||||
background: -ms-linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* IE10+ */
|
||||
background: linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* W3C */
|
||||
-webkit-box-shadow: none;
|
||||
-moz-box-shadow: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
/* workarounds */
|
||||
button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
|
||||
/*
|
||||
* jQuery UI Dialog 1.8.7
|
||||
*
|
||||
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Dialog#theming
|
||||
*/
|
||||
.ui-dialog { position: absolute; padding: 0; width: 300px; overflow: hidden; }
|
||||
.ui-dialog {
|
||||
-webkit-box-shadow: 0 2px 12px rgba(0,0,0,0.6);
|
||||
-moz-box-shadow: 0 2px 12px rgba(0,0,0,0.6);
|
||||
}
|
||||
.ui-dialog .ui-dialog-titlebar { padding: 0.7em 1em 0.6em 1em; position: relative; border: none; border-bottom: 1px solid #979797; -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0; }
|
||||
.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .2em 0; font-size: 14px; text-shadow: 0 1px 0 rgba(255,255,255,0.5); }
|
||||
.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .8em; top: 55%; width: 16px; margin: -10px 0 0 0; padding: 0; height: 16px; }
|
||||
.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; background: url(../lib/css/Aristo/images/icon_sprite.png) 0 -16px no-repeat; }
|
||||
.ui-dialog .ui-dialog-titlebar-close:hover span { background-position: -16px -16px; }
|
||||
.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; border: 0; }
|
||||
.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
|
||||
.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
|
||||
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; }
|
||||
.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; }
|
||||
.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
|
||||
.ui-draggable .ui-dialog-titlebar { cursor: move; }
|
||||
/*
|
||||
* jQuery UI Slider 1.8.7
|
||||
*
|
||||
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Slider#theming
|
||||
*/
|
||||
.ui-slider { position: relative; text-align: left; background: #d7d7d7; z-index: 1; }
|
||||
.ui-slider { -moz-box-shadow: 0 1px 2px rgba(0,0,0,0.5) inset; -webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.5) inset; box-shadow: 0 1px 2px rgba(0,0,0,0.5) inset; }
|
||||
.ui-slider .ui-slider-handle { background: url(../lib/css/Aristo/images/slider_handles.png) 0px -23px no-repeat; position: absolute; z-index: 2; width: 23px; height: 23px; cursor: default; border: none; outline: none; -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; }
|
||||
.ui-slider .ui-state-hover, .ui-slider .ui-state-active { background-position: 0 0; }
|
||||
.ui-slider .ui-slider-range { background: #a3cae0; position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
|
||||
.ui-slider .ui-slider-range { -moz-box-shadow: 0 1px 2px rgba(17,35,45,0.6) inset; -webkit-box-shadow: 0 1px 2px rgba(17,35,45,0.6) inset; box-shadow: 0 1px 2px rgba(17,35,45,0.6) inset; }
|
||||
|
||||
|
||||
.ui-slider-horizontal { height: 5px; }
|
||||
.ui-slider-horizontal .ui-slider-handle { top: -8px; margin-left: -13px; }
|
||||
.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
|
||||
.ui-slider-horizontal .ui-slider-range-min { left: 0; }
|
||||
.ui-slider-horizontal .ui-slider-range-max { right: 0; }
|
||||
|
||||
.ui-slider-vertical { width: 5px; height: 100px; }
|
||||
.ui-slider-vertical .ui-slider-handle { left: -8px; margin-left: 0; margin-bottom: -13px; }
|
||||
.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
|
||||
.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
|
||||
.ui-slider-vertical .ui-slider-range-max { top: 0; }/*
|
||||
* jQuery UI Tabs 1.8.7
|
||||
*
|
||||
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Tabs#theming
|
||||
*/
|
||||
.ui-tabs { position: relative; zoom: 1; border: 0; background: transparent; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
|
||||
.ui-tabs .ui-tabs-nav { margin: 0; padding: 0; background: transparent; border-width: 0 0 1px 0; }
|
||||
.ui-tabs .ui-tabs-nav {
|
||||
-moz-border-radius: 0;
|
||||
-webkit-border-radius: 0;
|
||||
border-radius: 0;
|
||||
}
|
||||
.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
|
||||
.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; font-size: 12px; font-weight: bold; text-shadow: 0 1px 0 rgba(255,255,255,0.5); }
|
||||
.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; background: #fff; border-color: #B6B6B6; }
|
||||
.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; outline: none; }
|
||||
.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
|
||||
.ui-tabs .ui-tabs-panel { display: block; border-width: 0 1px 1px 1px; padding: 1em 1.4em; background: none; }
|
||||
.ui-tabs .ui-tabs-panel { background: #FFF;
|
||||
-moz-border-radius: 0;
|
||||
-webkit-border-radius: 0;
|
||||
border-radius: 0;
|
||||
}
|
||||
.ui-tabs .ui-tabs-hide { display: none !important; }
|
||||
/*
|
||||
* jQuery UI Datepicker 1.8.7
|
||||
*
|
||||
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Datepicker#theming
|
||||
*/
|
||||
.ui-datepicker { width: 17em; padding: 0; display: none; border-color: #DDDDDD; }
|
||||
.ui-datepicker {
|
||||
-moz-box-shadow: 0 4px 8px rgba(0,0,0,0.5);
|
||||
-webkit-box-shadow: 0 4px 8px rgba(0,0,0,0.5);
|
||||
box-shadow: 0 4px 8px rgba(0,0,0,0.5);
|
||||
}
|
||||
.ui-datepicker .ui-datepicker-header { position:relative; padding:.35em 0; border: none; border-bottom: 1px solid #B6B6B6; -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0; }
|
||||
.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 6px; width: 1.8em; height: 1.8em; }
|
||||
.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { border: 1px none; }
|
||||
.ui-datepicker .ui-datepicker-prev { left:2px; }
|
||||
.ui-datepicker .ui-datepicker-next { right:2px; }
|
||||
.ui-datepicker .ui-datepicker-prev span { background-position: 0px -32px !important; }
|
||||
.ui-datepicker .ui-datepicker-next span { background-position: -16px -32px !important; }
|
||||
.ui-datepicker .ui-datepicker-prev-hover span { background-position: 0px -48px !important; }
|
||||
.ui-datepicker .ui-datepicker-next-hover span { background-position: -16px -48px !important; }
|
||||
.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; background: url(../lib/css/Aristo/images/icon_sprite.png) no-repeat; }
|
||||
.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; font-size: 12px; text-shadow: 0 1px 0 rgba(255,255,255,0.6); }
|
||||
.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
|
||||
.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
|
||||
.ui-datepicker select.ui-datepicker-month,
|
||||
.ui-datepicker select.ui-datepicker-year { width: 49%;}
|
||||
.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
|
||||
.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
|
||||
.ui-datepicker td { border: 0; padding: 1px; }
|
||||
.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
|
||||
.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
|
||||
.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
|
||||
.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
|
||||
.ui-datepicker table .ui-state-highlight { border-color: #5F83B9; }
|
||||
.ui-datepicker table .ui-state-hover { background: #5F83B9; color: #FFF; font-weight: bold; text-shadow: 0 1px 1px #234386; -webkit-box-shadow: 0 0px 0 rgba(255,255,255,0.6) inset; -moz-box-shadow: 0 0px 0 rgba(255,255,255,0.6) inset; box-shadow: 0 0px 0 rgba(255,255,255,0.6) inset; border-color: #5F83B9; }
|
||||
.ui-datepicker-calendar .ui-state-default { background: transparent; border-color: #FFF; }
|
||||
.ui-datepicker-calendar .ui-state-active { background: #5F83B9; border-color: #5F83B9; color: #FFF; font-weight: bold; text-shadow: 0 1px 1px #234386; }
|
||||
|
||||
/* with multiple calendars */
|
||||
.ui-datepicker.ui-datepicker-multi { width:auto; }
|
||||
.ui-datepicker-multi .ui-datepicker-group { float:left; }
|
||||
.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
|
||||
.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
|
||||
.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
|
||||
.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
|
||||
.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
|
||||
.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
|
||||
.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
|
||||
.ui-datepicker-row-break { clear:both; width:100%; }
|
||||
|
||||
/* RTL support */
|
||||
.ui-datepicker-rtl { direction: rtl; }
|
||||
.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
|
||||
.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
|
||||
.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
|
||||
.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
|
||||
.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
|
||||
.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
|
||||
.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
|
||||
.ui-datepicker-rtl .ui-datepicker-group { float:right; }
|
||||
.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
|
||||
.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
|
||||
|
||||
/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
|
||||
.ui-datepicker-cover {
|
||||
display: none; /*sorry for IE5*/
|
||||
display/**/: block; /*sorry for IE5*/
|
||||
position: absolute; /*must have*/
|
||||
z-index: -1; /*must have*/
|
||||
filter: mask(); /*must have*/
|
||||
top: -4px; /*must have*/
|
||||
left: -4px; /*must have*/
|
||||
width: 200px; /*must have*/
|
||||
height: 200px; /*must have*/
|
||||
}/*
|
||||
* jQuery UI Progressbar 1.8.7
|
||||
*
|
||||
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Progressbar#theming
|
||||
*/
|
||||
.ui-progressbar { height: 12px; text-align: left; background: #FFF url(../lib/css/Aristo/images/progress_bar.gif) 0 -14px repeat-x; }
|
||||
.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; background: url(../lib/css/Aristo/images/progress_bar.gif) 0 0 repeat-x; }
|
||||
|
||||
/* Extra Input Field Styling */
|
||||
.ui-form textarea, .ui-form input:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]) {
|
||||
padding: 3px;
|
||||
-webkit-border-radius: 2px;
|
||||
-moz-border-radius: 2px;
|
||||
border-radius: 2px;
|
||||
border: 1px solid #cecece;
|
||||
outline: none;
|
||||
-webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.1) inset, 0 1px 0 rgba(255,255,255,0.2);
|
||||
-moz-box-shadow: 0 1px 3px rgba(0,0,0,0.1) inset, 0 1px 0 rgba(255,255,255,0.2);
|
||||
box-shadow: 0 1px 3px rgba(0,0,0,0.1) inset, 0 1px 0 rgba(255,255,255,0.2);
|
||||
-webkit-transition: all 0.25s ease-in-out;
|
||||
-moz-transition: all 0.25 ease-in-out;
|
||||
-o-transition: all 0.25s ease-in-out;
|
||||
}
|
||||
.ui-form textarea:hover, .ui-form input:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):hover {
|
||||
border: 1px solid #bdbdbd;
|
||||
-webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.2) inset, 0 1px 0 rgba(255,255,255,0.2);
|
||||
-moz-box-shadow: 0 1px 3px rgba(0,0,0,0.2) inset, 0 1px 0 rgba(255,255,255,0.2);
|
||||
box-shadow: 0 1px 3px rgba(0,0,0,0.2) inset, 0 1px 0 rgba(255,255,255,0.2);
|
||||
}
|
||||
.ui-form textarea:focus, .ui-form input:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):focus {
|
||||
border: 1px solid #95bdd4;
|
||||
-webkit-box-shadow: 0 2px 3px rgba(161,202,226,0.5) inset, 0 1px 0 rgba(255,255,255,0.2);
|
||||
-moz-box-shadow: 0 2px 3px rgba(161,202,226,0.5) inset, 0 1px 0 rgba(255,255,255,0.2);
|
||||
box-shadow: 0 2px 3px rgba(161,202,226,0.5) inset, 0 1px 0 rgba(255,255,255,0.2);
|
||||
}
|
||||
479
css/Aristo/aristo.selected.css
Normal file
|
|
@ -0,0 +1,479 @@
|
|||
/*
|
||||
* jQuery UI CSS Framework 1.8.7
|
||||
*
|
||||
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Theming/API
|
||||
*/
|
||||
|
||||
/* Layout helpers
|
||||
----------------------------------*/
|
||||
.ui-helper-hidden { display: none; }
|
||||
.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
|
||||
.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
|
||||
.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
|
||||
.ui-helper-clearfix { display: inline-block; }
|
||||
/* required comment for clearfix to work in Opera \*/
|
||||
* html .ui-helper-clearfix { height:1%; }
|
||||
.ui-helper-clearfix { display:block; }
|
||||
/* end clearfix */
|
||||
.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
|
||||
|
||||
|
||||
/* Interaction Cues
|
||||
----------------------------------*/
|
||||
.ui-state-disabled { cursor: default !important; }
|
||||
|
||||
|
||||
/* Icons
|
||||
----------------------------------*/
|
||||
|
||||
/* states and images */
|
||||
.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
|
||||
|
||||
|
||||
/* Misc visuals
|
||||
----------------------------------*/
|
||||
|
||||
/* Overlays */
|
||||
.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
|
||||
|
||||
|
||||
/*
|
||||
* jQuery UI CSS Framework 1.8.7
|
||||
*
|
||||
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Theming/API
|
||||
*
|
||||
* To view and modify this theme, visit http://jqueryui.com/themeroller/?ctl=themeroller
|
||||
*/
|
||||
|
||||
|
||||
/* Component containers
|
||||
----------------------------------*/
|
||||
.ui-widget { font-family: Arial,sans-serif; font-size: 1.1em; }
|
||||
.ui-widget .ui-widget { font-size: 1em; }
|
||||
.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Arial,sans-serif; font-size: 1em; }
|
||||
.ui-widget-content { border: 1px solid #B6B6B6; background: #ffffff; color: #4F4F4F; }
|
||||
.ui-widget-content a { color: #4F4F4F; }
|
||||
.ui-widget-header { border: 1px solid #B6B6B6; color: #4F4F4F; font-weight: bold; }
|
||||
.ui-widget-header {
|
||||
background: #ededed url(../lib/css/Aristo/images/bg_fallback.png) 0 0 repeat-x; /* Old browsers */
|
||||
background: -moz-linear-gradient(top, #ededed 0%, #c4c4c4 100%); /* FF3.6+ */
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ededed), color-stop(100%,#c4c4c4)); /* Chrome,Safari4+ */
|
||||
background: -webkit-linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* Chrome10+,Safari5.1+ */
|
||||
background: -o-linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* Opera11.10+ */
|
||||
background: -ms-linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* IE10+ */
|
||||
background: linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* W3C */
|
||||
}
|
||||
.ui-widget-header a { color: #4F4F4F; }
|
||||
|
||||
/* Interaction states
|
||||
----------------------------------*/
|
||||
.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #B6B6B6; font-weight: normal; color: #4F4F4F; }
|
||||
.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default {
|
||||
background: #ededed url(../lib/css/Aristo/images/bg_fallback.png) 0 0 repeat-x; /* Old browsers */
|
||||
background: -moz-linear-gradient(top, #ededed 0%, #c4c4c4 100%); /* FF3.6+ */
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ededed), color-stop(100%,#c4c4c4)); /* Chrome,Safari4+ */
|
||||
background: -webkit-linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* Chrome10+,Safari5.1+ */
|
||||
background: -o-linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* Opera11.10+ */
|
||||
background: -ms-linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* IE10+ */
|
||||
background: linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* W3C */
|
||||
-webkit-box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset;
|
||||
-moz-box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset;
|
||||
box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset;
|
||||
}
|
||||
.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #4F4F4F; text-decoration: none; }
|
||||
.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #9D9D9D; font-weight: normal; color: #313131; }
|
||||
.ui-state-hover a, .ui-state-hover a:hover { color: #313131; text-decoration: none; }
|
||||
.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active {
|
||||
outline: none;
|
||||
color: #1c4257; border: 1px solid #7096ab;
|
||||
background: #ededed url(../lib/css/Aristo/images/bg_fallback.png) 0 -50px repeat-x; /* Old browsers */
|
||||
background: -moz-linear-gradient(top, #b9e0f5 0%, #92bdd6 100%); /* FF3.6+ */
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#b9e0f5), color-stop(100%,#92bdd6)); /* Chrome,Safari4+ */
|
||||
background: -webkit-linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* Chrome10+,Safari5.1+ */
|
||||
background: -o-linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* Opera11.10+ */
|
||||
background: -ms-linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* IE10+ */
|
||||
background: linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* W3C */
|
||||
-webkit-box-shadow: none;
|
||||
-moz-box-shadow: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #313131; text-decoration: none; }
|
||||
.ui-widget :active { outline: none; }
|
||||
|
||||
/* Interaction Cues
|
||||
----------------------------------*/
|
||||
.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight { border: 1px solid #d2dbf4; background: #f4f8fd; color: #0d2054; -moz-border-radius: 0 !important; -webkit-border-radius: 0 !important; border-radius: 0 !important; }
|
||||
.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
|
||||
.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error { border: 1px solid #e2d0d0; background: #fcf0f0; color: #280b0b; -moz-border-radius: 0 !important; -webkit-border-radius: 0 !important; border-radius: 0 !important; }
|
||||
.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a; }
|
||||
.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a; }
|
||||
.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
|
||||
.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
|
||||
.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
|
||||
|
||||
/* Icons
|
||||
----------------------------------*/
|
||||
|
||||
/* states and images */
|
||||
.ui-icon { width: 16px; height: 16px; background-image: url(../lib/css/Aristo/images/ui-icons_222222_256x240.png); }
|
||||
.ui-widget-content .ui-icon {background-image: url(../lib/css/Aristo/images/ui-icons_222222_256x240.png); }
|
||||
.ui-widget-header .ui-icon {background-image: url(../lib/css/Aristo/images/ui-icons_222222_256x240.png); }
|
||||
.ui-state-default .ui-icon { background-image: url(../lib/css/Aristo/images/ui-icons_454545_256x240.png); }
|
||||
.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(../lib/css/Aristo/images/ui-icons_454545_256x240.png); }
|
||||
.ui-state-active .ui-icon {background-image: url(../lib/css/Aristo/images/ui-icons_454545_256x240.png); }
|
||||
.ui-state-highlight .ui-icon {background-image: url(../lib/css/Aristo/images/ui-icons_454545_256x240.png); }
|
||||
.ui-state-error .ui-icon, .ui-state-error-text .ui-icon { background: url(../lib/css/Aristo/images/icon_sprite.png) -16px 0 no-repeat !important; }
|
||||
.ui-state-highlight .ui-icon, .ui-state-error .ui-icon { margin-top: -1px; }
|
||||
|
||||
/* positioning */
|
||||
.ui-icon-carat-1-n { background-position: 0 0; }
|
||||
.ui-icon-carat-1-ne { background-position: -16px 0; }
|
||||
.ui-icon-carat-1-e { background-position: -32px 0; }
|
||||
.ui-icon-carat-1-se { background-position: -48px 0; }
|
||||
.ui-icon-carat-1-s { background-position: -64px 0; }
|
||||
.ui-icon-carat-1-sw { background-position: -80px 0; }
|
||||
.ui-icon-carat-1-w { background-position: -96px 0; }
|
||||
.ui-icon-carat-1-nw { background-position: -112px 0; }
|
||||
.ui-icon-carat-2-n-s { background-position: -128px 0; }
|
||||
.ui-icon-carat-2-e-w { background-position: -144px 0; }
|
||||
.ui-icon-triangle-1-n { background-position: 0 -16px; }
|
||||
.ui-icon-triangle-1-ne { background-position: -16px -16px; }
|
||||
.ui-icon-triangle-1-e { background-position: -32px -16px; }
|
||||
.ui-icon-triangle-1-se { background-position: -48px -16px; }
|
||||
.ui-icon-triangle-1-s { background-position: -64px -16px; }
|
||||
.ui-icon-triangle-1-sw { background-position: -80px -16px; }
|
||||
.ui-icon-triangle-1-w { background-position: -96px -16px; }
|
||||
.ui-icon-triangle-1-nw { background-position: -112px -16px; }
|
||||
.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
|
||||
.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
|
||||
.ui-icon-arrow-1-n { background-position: 0 -32px; }
|
||||
.ui-icon-arrow-1-ne { background-position: -16px -32px; }
|
||||
.ui-icon-arrow-1-e { background-position: -32px -32px; }
|
||||
.ui-icon-arrow-1-se { background-position: -48px -32px; }
|
||||
.ui-icon-arrow-1-s { background-position: -64px -32px; }
|
||||
.ui-icon-arrow-1-sw { background-position: -80px -32px; }
|
||||
.ui-icon-arrow-1-w { background-position: -96px -32px; }
|
||||
.ui-icon-arrow-1-nw { background-position: -112px -32px; }
|
||||
.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
|
||||
.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
|
||||
.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
|
||||
.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
|
||||
.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
|
||||
.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
|
||||
.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
|
||||
.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
|
||||
.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
|
||||
.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
|
||||
.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
|
||||
.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
|
||||
.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
|
||||
.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
|
||||
.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
|
||||
.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
|
||||
.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
|
||||
.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
|
||||
.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
|
||||
.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
|
||||
.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
|
||||
.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
|
||||
.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
|
||||
.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
|
||||
.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
|
||||
.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
|
||||
.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
|
||||
.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
|
||||
.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
|
||||
.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
|
||||
.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
|
||||
.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
|
||||
.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
|
||||
.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
|
||||
.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
|
||||
.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
|
||||
.ui-icon-arrow-4 { background-position: 0 -80px; }
|
||||
.ui-icon-arrow-4-diag { background-position: -16px -80px; }
|
||||
.ui-icon-extlink { background-position: -32px -80px; }
|
||||
.ui-icon-newwin { background-position: -48px -80px; }
|
||||
.ui-icon-refresh { background-position: -64px -80px; }
|
||||
.ui-icon-shuffle { background-position: -80px -80px; }
|
||||
.ui-icon-transfer-e-w { background-position: -96px -80px; }
|
||||
.ui-icon-transferthick-e-w { background-position: -112px -80px; }
|
||||
.ui-icon-folder-collapsed { background-position: 0 -96px; }
|
||||
.ui-icon-folder-open { background-position: -16px -96px; }
|
||||
.ui-icon-document { background-position: -32px -96px; }
|
||||
.ui-icon-document-b { background-position: -48px -96px; }
|
||||
.ui-icon-note { background-position: -64px -96px; }
|
||||
.ui-icon-mail-closed { background-position: -80px -96px; }
|
||||
.ui-icon-mail-open { background-position: -96px -96px; }
|
||||
.ui-icon-suitcase { background-position: -112px -96px; }
|
||||
.ui-icon-comment { background-position: -128px -96px; }
|
||||
.ui-icon-person { background-position: -144px -96px; }
|
||||
.ui-icon-print { background-position: -160px -96px; }
|
||||
.ui-icon-trash { background-position: -176px -96px; }
|
||||
.ui-icon-locked { background-position: -192px -96px; }
|
||||
.ui-icon-unlocked { background-position: -208px -96px; }
|
||||
.ui-icon-bookmark { background-position: -224px -96px; }
|
||||
.ui-icon-tag { background-position: -240px -96px; }
|
||||
.ui-icon-home { background-position: 0 -112px; }
|
||||
.ui-icon-flag { background-position: -16px -112px; }
|
||||
.ui-icon-calendar { background-position: -32px -112px; }
|
||||
.ui-icon-cart { background-position: -48px -112px; }
|
||||
.ui-icon-pencil { background-position: -64px -112px; }
|
||||
.ui-icon-clock { background-position: -80px -112px; }
|
||||
.ui-icon-disk { background-position: -96px -112px; }
|
||||
.ui-icon-calculator { background-position: -112px -112px; }
|
||||
.ui-icon-zoomin { background-position: -128px -112px; }
|
||||
.ui-icon-zoomout { background-position: -144px -112px; }
|
||||
.ui-icon-search { background-position: -160px -112px; }
|
||||
.ui-icon-wrench { background-position: -176px -112px; }
|
||||
.ui-icon-gear { background-position: -192px -112px; }
|
||||
.ui-icon-heart { background-position: -208px -112px; }
|
||||
.ui-icon-star { background-position: -224px -112px; }
|
||||
.ui-icon-link { background-position: -240px -112px; }
|
||||
.ui-icon-cancel { background-position: 0 -128px; }
|
||||
.ui-icon-plus { background-position: -16px -128px; }
|
||||
.ui-icon-plusthick { background-position: -32px -128px; }
|
||||
.ui-icon-minus { background-position: -48px -128px; }
|
||||
.ui-icon-minusthick { background-position: -64px -128px; }
|
||||
.ui-icon-close { background-position: -80px -128px; }
|
||||
.ui-icon-closethick { background-position: -96px -128px; }
|
||||
.ui-icon-key { background-position: -112px -128px; }
|
||||
.ui-icon-lightbulb { background-position: -128px -128px; }
|
||||
.ui-icon-scissors { background-position: -144px -128px; }
|
||||
.ui-icon-clipboard { background-position: -160px -128px; }
|
||||
.ui-icon-copy { background-position: -176px -128px; }
|
||||
.ui-icon-contact { background-position: -192px -128px; }
|
||||
.ui-icon-image { background-position: -208px -128px; }
|
||||
.ui-icon-video { background-position: -224px -128px; }
|
||||
.ui-icon-script { background-position: -240px -128px; }
|
||||
.ui-icon-alert { background-position: 0 -144px; }
|
||||
.ui-icon-info { background: url(../lib/css/Aristo/images/icon_sprite.png) 0 0 no-repeat !important; }
|
||||
.ui-icon-notice { background-position: -32px -144px; }
|
||||
.ui-icon-help { background-position: -48px -144px; }
|
||||
.ui-icon-check { background-position: -64px -144px; }
|
||||
.ui-icon-bullet { background-position: -80px -144px; }
|
||||
.ui-icon-radio-off { background-position: -96px -144px; }
|
||||
.ui-icon-radio-on { background-position: -112px -144px; }
|
||||
.ui-icon-pin-w { background-position: -128px -144px; }
|
||||
.ui-icon-pin-s { background-position: -144px -144px; }
|
||||
.ui-icon-play { background-position: 0 -160px; }
|
||||
.ui-icon-pause { background-position: -16px -160px; }
|
||||
.ui-icon-seek-next { background-position: -32px -160px; }
|
||||
.ui-icon-seek-prev { background-position: -48px -160px; }
|
||||
.ui-icon-seek-end { background-position: -64px -160px; }
|
||||
.ui-icon-seek-start { background-position: -80px -160px; }
|
||||
/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
|
||||
.ui-icon-seek-first { background-position: -80px -160px; }
|
||||
.ui-icon-stop { background-position: -96px -160px; }
|
||||
.ui-icon-eject { background-position: -112px -160px; }
|
||||
.ui-icon-volume-off { background-position: -128px -160px; }
|
||||
.ui-icon-volume-on { background-position: -144px -160px; }
|
||||
.ui-icon-power { background-position: 0 -176px; }
|
||||
.ui-icon-signal-diag { background-position: -16px -176px; }
|
||||
.ui-icon-signal { background-position: -32px -176px; }
|
||||
.ui-icon-battery-0 { background-position: -48px -176px; }
|
||||
.ui-icon-battery-1 { background-position: -64px -176px; }
|
||||
.ui-icon-battery-2 { background-position: -80px -176px; }
|
||||
.ui-icon-battery-3 { background-position: -96px -176px; }
|
||||
.ui-icon-circle-plus { background-position: 0 -192px; }
|
||||
.ui-icon-circle-minus { background-position: -16px -192px; }
|
||||
.ui-icon-circle-close { background-position: -32px -192px; }
|
||||
.ui-icon-circle-triangle-e { background-position: -48px -192px; }
|
||||
.ui-icon-circle-triangle-s { background-position: -64px -192px; }
|
||||
.ui-icon-circle-triangle-w { background-position: -80px -192px; }
|
||||
.ui-icon-circle-triangle-n { background-position: -96px -192px; }
|
||||
.ui-icon-circle-arrow-e { background-position: -112px -192px; }
|
||||
.ui-icon-circle-arrow-s { background-position: -128px -192px; }
|
||||
.ui-icon-circle-arrow-w { background-position: -144px -192px; }
|
||||
.ui-icon-circle-arrow-n { background-position: -160px -192px; }
|
||||
.ui-icon-circle-zoomin { background-position: -176px -192px; }
|
||||
.ui-icon-circle-zoomout { background-position: -192px -192px; }
|
||||
.ui-icon-circle-check { background-position: -208px -192px; }
|
||||
.ui-icon-circlesmall-plus { background-position: 0 -208px; }
|
||||
.ui-icon-circlesmall-minus { background-position: -16px -208px; }
|
||||
.ui-icon-circlesmall-close { background-position: -32px -208px; }
|
||||
.ui-icon-squaresmall-plus { background-position: -48px -208px; }
|
||||
.ui-icon-squaresmall-minus { background-position: -64px -208px; }
|
||||
.ui-icon-squaresmall-close { background-position: -80px -208px; }
|
||||
.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
|
||||
.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
|
||||
.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
|
||||
.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
|
||||
.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
|
||||
.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
|
||||
|
||||
|
||||
/* Misc visuals
|
||||
----------------------------------*/
|
||||
|
||||
/* Corner radius */
|
||||
.ui-corner-tl { -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; border-top-left-radius: 3px; }
|
||||
.ui-corner-tr { -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 3px; border-top-right-radius: 3px; }
|
||||
.ui-corner-bl { -moz-border-radius-bottomleft: 3px; -webkit-border-bottom-left-radius: 3px; border-bottom-left-radius: 3px; }
|
||||
.ui-corner-br { -moz-border-radius-bottomright: 3px; -webkit-border-bottom-right-radius: 3px; border-bottom-right-radius: 3px; }
|
||||
.ui-corner-top { -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; border-top-left-radius: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 3px; border-top-right-radius: 3px; }
|
||||
.ui-corner-bottom { -moz-border-radius-bottomleft: 3px; -webkit-border-bottom-left-radius: 3px; border-bottom-left-radius: 3px; -moz-border-radius-bottomright: 3px; -webkit-border-bottom-right-radius: 3px; border-bottom-right-radius: 3px; }
|
||||
.ui-corner-right { -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 3px; border-top-right-radius: 3px; -moz-border-radius-bottomright: 3px; -webkit-border-bottom-right-radius: 3px; border-bottom-right-radius: 3px; }
|
||||
.ui-corner-left { -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; border-top-left-radius: 3px; -moz-border-radius-bottomleft: 3px; -webkit-border-bottom-left-radius: 3px; border-bottom-left-radius: 3px; }
|
||||
.ui-corner-all { -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; }
|
||||
|
||||
/* Overlays */
|
||||
.ui-widget-overlay { background: #262b33; opacity: .70;filter:Alpha(Opacity=70); }
|
||||
.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #000000; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }
|
||||
|
||||
/*
|
||||
* jQuery UI Autocomplete 1.8.7
|
||||
*
|
||||
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Autocomplete#theming
|
||||
*/
|
||||
.ui-autocomplete {
|
||||
position: absolute; cursor: default; z-index: 3;
|
||||
-moz-border-radius: 0;
|
||||
-webkit-border-radius: 0;
|
||||
border-radius: 0;
|
||||
-moz-box-shadow: 0 1px 5px rgba(0,0,0,0.3);
|
||||
-webkit-box-shadow: 0 1px 5px rgba(0,0,0,0.3);
|
||||
box-shadow: 0 1px 5px rgba(0,0,0,0.3);
|
||||
}
|
||||
|
||||
/* workarounds */
|
||||
* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
|
||||
|
||||
/*
|
||||
* jQuery UI Menu 1.8.7
|
||||
*
|
||||
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Menu#theming
|
||||
*/
|
||||
.ui-menu {
|
||||
list-style:none;
|
||||
padding: 2px;
|
||||
margin: 0;
|
||||
display:block;
|
||||
float: left;
|
||||
}
|
||||
.ui-menu .ui-menu {
|
||||
margin-top: -3px;
|
||||
}
|
||||
.ui-menu .ui-menu-item {
|
||||
margin:0;
|
||||
padding: 0;
|
||||
zoom: 1;
|
||||
float: left;
|
||||
clear: left;
|
||||
width: 100%;
|
||||
}
|
||||
.ui-menu .ui-menu-item a {
|
||||
text-decoration:none;
|
||||
display:block;
|
||||
padding:.2em .4em;
|
||||
line-height:1.5;
|
||||
zoom:1;
|
||||
}
|
||||
.ui-menu .ui-menu-item a.ui-state-hover,
|
||||
.ui-menu .ui-menu-item a.ui-state-active {
|
||||
font-weight: normal;
|
||||
margin: -1px;
|
||||
background: #5f83b9;
|
||||
color: #FFFFFF;
|
||||
border-color: #466086;
|
||||
-moz-border-radius: 0;
|
||||
-webkit-border-radius: 0;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* jQuery UI Datepicker 1.8.7
|
||||
*
|
||||
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Datepicker#theming
|
||||
*/
|
||||
.ui-datepicker { width: 17em; padding: 0; display: none; border-color: #DDDDDD; }
|
||||
.ui-datepicker {
|
||||
-moz-box-shadow: 0 4px 8px rgba(0,0,0,0.5);
|
||||
-webkit-box-shadow: 0 4px 8px rgba(0,0,0,0.5);
|
||||
box-shadow: 0 4px 8px rgba(0,0,0,0.5);
|
||||
}
|
||||
.ui-datepicker .ui-datepicker-header { position:relative; padding:.35em 0; border: none; border-bottom: 1px solid #B6B6B6; -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0; }
|
||||
.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 6px; width: 1.8em; height: 1.8em; }
|
||||
.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { border: 1px none; }
|
||||
.ui-datepicker .ui-datepicker-prev { left:2px; }
|
||||
.ui-datepicker .ui-datepicker-next { right:2px; }
|
||||
.ui-datepicker .ui-datepicker-prev span { background-position: 0px -32px !important; }
|
||||
.ui-datepicker .ui-datepicker-next span { background-position: -16px -32px !important; }
|
||||
.ui-datepicker .ui-datepicker-prev-hover span { background-position: 0px -48px !important; }
|
||||
.ui-datepicker .ui-datepicker-next-hover span { background-position: -16px -48px !important; }
|
||||
.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; background: url(../lib/css/Aristo/images/icon_sprite.png) no-repeat; }
|
||||
.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; font-size: 12px; text-shadow: 0 1px 0 rgba(255,255,255,0.6); }
|
||||
.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
|
||||
.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
|
||||
.ui-datepicker select.ui-datepicker-month,
|
||||
.ui-datepicker select.ui-datepicker-year { width: 49%;}
|
||||
.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
|
||||
.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
|
||||
.ui-datepicker td { border: 0; padding: 1px; }
|
||||
.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
|
||||
.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
|
||||
.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
|
||||
.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
|
||||
.ui-datepicker table .ui-state-highlight { border-color: #5F83B9; }
|
||||
.ui-datepicker table .ui-state-hover { background: #5F83B9; color: #FFF; font-weight: bold; text-shadow: 0 1px 1px #234386; -webkit-box-shadow: 0 0px 0 rgba(255,255,255,0.6) inset; -moz-box-shadow: 0 0px 0 rgba(255,255,255,0.6) inset; box-shadow: 0 0px 0 rgba(255,255,255,0.6) inset; border-color: #5F83B9; }
|
||||
.ui-datepicker-calendar .ui-state-default { background: transparent; border-color: #FFF; }
|
||||
.ui-datepicker-calendar .ui-state-active { background: #5F83B9; border-color: #5F83B9; color: #FFF; font-weight: bold; text-shadow: 0 1px 1px #234386; }
|
||||
|
||||
/* with multiple calendars */
|
||||
.ui-datepicker.ui-datepicker-multi { width:auto; }
|
||||
.ui-datepicker-multi .ui-datepicker-group { float:left; }
|
||||
.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
|
||||
.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
|
||||
.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
|
||||
.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
|
||||
.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
|
||||
.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
|
||||
.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
|
||||
.ui-datepicker-row-break { clear:both; width:100%; }
|
||||
|
||||
/* RTL support */
|
||||
.ui-datepicker-rtl { direction: rtl; }
|
||||
.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
|
||||
.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
|
||||
.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
|
||||
.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
|
||||
.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
|
||||
.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
|
||||
.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
|
||||
.ui-datepicker-rtl .ui-datepicker-group { float:right; }
|
||||
.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
|
||||
.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
|
||||
|
||||
/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
|
||||
.ui-datepicker-cover {
|
||||
display: none; /*sorry for IE5*/
|
||||
display/**/: block; /*sorry for IE5*/
|
||||
position: absolute; /*must have*/
|
||||
z-index: -1; /*must have*/
|
||||
filter: mask(); /*must have*/
|
||||
top: -4px; /*must have*/
|
||||
left: -4px; /*must have*/
|
||||
width: 200px; /*must have*/
|
||||
height: 200px; /*must have*/
|
||||
}
|
||||
|
||||
BIN
css/Aristo/images/bg_fallback.png
Executable file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
css/Aristo/images/icon_sprite.png
Executable file
|
After Width: | Height: | Size: 3.1 KiB |
BIN
css/Aristo/images/progress_bar.gif
Executable file
|
After Width: | Height: | Size: 502 B |
BIN
css/Aristo/images/slider_handles.png
Executable file
|
After Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
|
|
@ -1,4 +1,5 @@
|
|||
.close {
|
||||
font-family: Helvetica, Sans;
|
||||
float: right;
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
|
|
|
|||
92
css/bootstrap/popover.css
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
.popover {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 1010;
|
||||
display: none;
|
||||
padding: 5px;
|
||||
}
|
||||
.popover.top {
|
||||
margin-top: -5px;
|
||||
}
|
||||
.popover.right {
|
||||
margin-left: 5px;
|
||||
}
|
||||
.popover.bottom {
|
||||
margin-top: 5px;
|
||||
}
|
||||
.popover.left {
|
||||
margin-left: -5px;
|
||||
}
|
||||
.popover.top .arrow {
|
||||
bottom: 0;
|
||||
left: 50%;
|
||||
margin-left: -5px;
|
||||
border-left: 5px solid transparent;
|
||||
border-right: 5px solid transparent;
|
||||
border-top: 5px solid #000000;
|
||||
}
|
||||
.popover.right .arrow {
|
||||
top: 50%;
|
||||
left: 0;
|
||||
margin-top: -5px;
|
||||
border-top: 5px solid transparent;
|
||||
border-bottom: 5px solid transparent;
|
||||
border-right: 5px solid #000000;
|
||||
}
|
||||
.popover.bottom .arrow {
|
||||
top: 0;
|
||||
left: 50%;
|
||||
margin-left: -5px;
|
||||
border-left: 5px solid transparent;
|
||||
border-right: 5px solid transparent;
|
||||
border-bottom: 5px solid #000000;
|
||||
}
|
||||
.popover.left .arrow {
|
||||
top: 50%;
|
||||
right: 0;
|
||||
margin-top: -5px;
|
||||
border-top: 5px solid transparent;
|
||||
border-bottom: 5px solid transparent;
|
||||
border-left: 5px solid #000000;
|
||||
}
|
||||
.popover .arrow {
|
||||
position: absolute;
|
||||
width: 0;
|
||||
height: 0;
|
||||
}
|
||||
.popover-inner {
|
||||
padding: 3px;
|
||||
width: 280px;
|
||||
overflow: hidden;
|
||||
background: #000000;
|
||||
background: rgba(0, 0, 0, 0.8);
|
||||
-webkit-border-radius: 6px;
|
||||
-moz-border-radius: 6px;
|
||||
border-radius: 6px;
|
||||
-webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
|
||||
-moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
|
||||
box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
.popover-title {
|
||||
padding: 9px 15px;
|
||||
line-height: 1;
|
||||
background-color: #f5f5f5;
|
||||
border-bottom: 1px solid #eee;
|
||||
-webkit-border-radius: 3px 3px 0 0;
|
||||
-moz-border-radius: 3px 3px 0 0;
|
||||
border-radius: 3px 3px 0 0;
|
||||
}
|
||||
.popover-content {
|
||||
padding: 14px;
|
||||
background-color: #ffffff;
|
||||
-webkit-border-radius: 0 0 3px 3px;
|
||||
-moz-border-radius: 0 0 3px 3px;
|
||||
border-radius: 0 0 3px 3px;
|
||||
-webkit-background-clip: padding-box;
|
||||
-moz-background-clip: padding-box;
|
||||
background-clip: padding-box;
|
||||
}
|
||||
.popover-content p, .popover-content ul, .popover-content ol {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
BIN
css/fonts/droidsans.woff
Normal file
BIN
css/fonts/lato.woff
Normal file
BIN
css/fonts/opensans.woff
Normal file
BIN
css/fonts/pontanosans.woff
Normal file
BIN
css/fonts/ptsans.woff
Normal file
|
|
@ -1,91 +0,0 @@
|
|||
/*
|
||||
================================================
|
||||
autosuggest, inquisitor style
|
||||
================================================
|
||||
*/
|
||||
|
||||
div.autosuggest
|
||||
{
|
||||
position: absolute;
|
||||
margin-top: 3px;
|
||||
border: 1px solid #222;
|
||||
}
|
||||
|
||||
div.autosuggest ul
|
||||
{
|
||||
list-style: none;
|
||||
margin: 0px;
|
||||
padding: 2px;
|
||||
overflow: hidden;
|
||||
background-color: #FFF;
|
||||
}
|
||||
|
||||
div.autosuggest ul li
|
||||
{
|
||||
color: #444;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
div.autosuggest ul li a
|
||||
{
|
||||
color: #444;
|
||||
display: block;
|
||||
text-decoration: none;
|
||||
position: relative;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
}
|
||||
div.autosuggest ul li a:hover
|
||||
{
|
||||
|
||||
}
|
||||
div.autosuggest ul li.as_highlight a:hover
|
||||
{
|
||||
background-color: #45A;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
div.autosuggest ul li a span
|
||||
{
|
||||
display: block;
|
||||
padding: 3px 6px;
|
||||
color: #444;
|
||||
border-bottom:1px solid #DDD;
|
||||
}
|
||||
|
||||
div.autosuggest ul li a span small
|
||||
{
|
||||
display: block;
|
||||
font-weight: normal;
|
||||
color: #444;
|
||||
}
|
||||
|
||||
div.autosuggest ul li.as_highlight a span small
|
||||
{
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
div.autosuggest ul li.as_highlight a span {
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
div.autosuggest ul li.as_highlight a
|
||||
{
|
||||
color: #FFF;
|
||||
background-color: #45A;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
div.autosuggest ul li.as_warning
|
||||
{
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
div.autosuggest ul em
|
||||
{
|
||||
font-style: normal;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
|
@ -7,7 +7,7 @@ body {
|
|||
margin: 0px;
|
||||
padding: 0px;
|
||||
font-family: Arial, Helvetica, Sans;
|
||||
font-size: 12px;
|
||||
font-size: 14px;
|
||||
color: #000;
|
||||
background-color: #e2e2e2;
|
||||
}
|
||||
|
|
@ -22,19 +22,22 @@ label {
|
|||
}
|
||||
|
||||
select, input, textarea {
|
||||
border: 1px solid #AAA;
|
||||
border: 1px solid #ccc;
|
||||
-moz-border-radius: 4px;
|
||||
-webkit-border-radius: 4px;
|
||||
font-size: 13px;
|
||||
font-size: inherit;
|
||||
padding: 4px;
|
||||
color: #222;
|
||||
color: #444;
|
||||
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||
}
|
||||
|
||||
textarea {
|
||||
font-family: inherit;
|
||||
height: 120px;
|
||||
width: 90%;
|
||||
font-size: 12px;
|
||||
font-size: inherit;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
|
|
@ -97,8 +100,16 @@ div.fix_ff_cursor { overflow: auto; }
|
|||
|
||||
div.comment { color: #444; }
|
||||
|
||||
.small {
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.help {
|
||||
margin: 3px 0px;
|
||||
color: #888;
|
||||
}
|
||||
|
||||
div#body_div {
|
||||
position: relative;
|
||||
display: none;
|
||||
padding-right: 7px;
|
||||
width: 900px;
|
||||
|
|
@ -106,15 +117,40 @@ div#body_div {
|
|||
margin-top: 56px;
|
||||
}
|
||||
|
||||
footer {
|
||||
.content {
|
||||
width: 900px;
|
||||
margin: auto;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.background-fade-in {
|
||||
-webkit-transition: background 1s ease-in; /* property duration timing-function delay */
|
||||
-moz-transition: background 1s ease-in;
|
||||
-o-transition: background 1s ease-in;
|
||||
transition: background 1s ease-in;
|
||||
}
|
||||
|
||||
footer {
|
||||
position: absolute;
|
||||
bottom: 0px;
|
||||
width: 100%;
|
||||
}
|
||||
header .container {
|
||||
width: 900px;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
@media (max-width: 1200px) {
|
||||
div#body_div, header .container, .content, #opened-page-selector, footer {
|
||||
width: 900px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1200px) {
|
||||
div#body_div, header .container, .content, #opened-page-selector, footer {
|
||||
width: 1100px;
|
||||
}
|
||||
}
|
||||
|
||||
div.no_script {
|
||||
display: none;
|
||||
}
|
||||
|
|
@ -128,7 +164,6 @@ div.loading_div {
|
|||
display: none;
|
||||
text-align: center;
|
||||
padding: 2px;
|
||||
font-size: 12px;
|
||||
border: 1px solid #FF4;
|
||||
}
|
||||
|
||||
|
|
@ -153,27 +188,18 @@ div.std-footer-item {
|
|||
-moz-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.gradient {
|
||||
background: #ededed; /* Old browsers */
|
||||
background: -moz-linear-gradient(top, #ededed 0%, #d1d1d1 47%, #b7b7b7 100%); /* FF3.6+ */
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ededed), color-stop(47%,#d1d1d1), color-stop(100%,#b7b7b7)); /* Chrome,Safari4+ */
|
||||
background: -webkit-linear-gradient(top, #ededed 0%,#d1d1d1 47%,#b7b7b7 100%); /* Chrome10+,Safari5.1+ */
|
||||
background: -o-linear-gradient(top, #ededed 0%,#d1d1d1 47%,#b7b7b7 100%); /* Opera11.10+ */
|
||||
background: -ms-linear-gradient(top, #ededed 0%,#d1d1d1 47%,#b7b7b7 100%); /* IE10+ */
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ededed', endColorstr='#b7b7b7',GradientType=0 ); /* IE6-9 */
|
||||
background: linear-gradient(top, #ededed 0%,#d1d1d1 47%,#b7b7b7 100%); /* W3C */
|
||||
}
|
||||
|
||||
.layout_wrapper, .layout-wrapper {
|
||||
-moz-box-shadow: 1px 1px 8px #555;
|
||||
-webkit-box-shadow: 1px 1px 8px #555;
|
||||
box-shadow: 1px 1px 8px #555;
|
||||
-moz-box-shadow: 0px 0px 6px rgba(0,0,0,0.3);
|
||||
-webkit-box-shadow: 0px 0px 6px rgba(0,0,0,0.3);
|
||||
box-shadow: 0px 0px 6px rgba(0,0,0,0.3);
|
||||
background-color: #fff;
|
||||
padding: 15px;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.layout-wrapper-background {
|
||||
background-color: #f2f2f2 !important;
|
||||
background-color: #fafafa !important;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
|
|
@ -182,7 +208,7 @@ div.std-footer-item {
|
|||
float: left;
|
||||
padding: 15px;
|
||||
background-color: #FFF;
|
||||
min-height: 450px;
|
||||
min-height: 600px;
|
||||
-moz-box-shadow: 7px 0px 6px -2px #ddd;
|
||||
-webkit-box-shadow: 7px 0px 6px -2px #ddd;
|
||||
box-shadow: 7px 0px 6px -2px #ddd;
|
||||
|
|
@ -191,10 +217,10 @@ div.std-footer-item {
|
|||
.layout-side-section {
|
||||
width: 22%;
|
||||
/*float: right;*/
|
||||
color: #606060;
|
||||
color: #606060;
|
||||
overflow-x: hidden;
|
||||
padding: 15px;
|
||||
min-height: 450px;
|
||||
min-height: 600px;
|
||||
}
|
||||
|
||||
/* from bootstrap */
|
||||
|
|
@ -229,10 +255,12 @@ div.std-footer-item {
|
|||
|
||||
.avatar-small {
|
||||
display: inline-block;
|
||||
min-width: 29px;
|
||||
width: 24px;
|
||||
height: 20px;
|
||||
vertical-align: middle;
|
||||
overflow: hidden;
|
||||
margin: 0px 3px;
|
||||
}
|
||||
.avatar-small img {
|
||||
height: 24px;
|
||||
margin-bottom: -7px;
|
||||
max-width: 24px;
|
||||
}
|
||||
width: 24px;
|
||||
}
|
||||
|
|
@ -152,7 +152,6 @@ div.cal_event {
|
|||
width: 100%;
|
||||
height: 12px;
|
||||
overflow: hidden;
|
||||
font-size: 11px;
|
||||
color: #00B;
|
||||
margin-bottom: 2px;
|
||||
text-decoration: underline;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,23 @@
|
|||
/* FORMS */
|
||||
|
||||
div.form-section-head {
|
||||
margin: 11px 0px 3px 0px;
|
||||
border-top: 1px solid #ccc;
|
||||
padding-top: 11px;
|
||||
}
|
||||
|
||||
div.form-layout-row:first-child .form-section-head {
|
||||
border-top: 0px solid #ccc !important;
|
||||
}
|
||||
|
||||
div.form-section-head h3 {
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
div.form-section-head hr {
|
||||
margin: 9px 0px;
|
||||
}
|
||||
|
||||
|
||||
div.frm_print_wrapper {
|
||||
background-color:#FFF;
|
||||
|
|
@ -28,24 +46,6 @@ div.grid_tbarlinks {
|
|||
}
|
||||
|
||||
|
||||
div.frm_tip_box {
|
||||
margin: 0px;
|
||||
padding: 8px;
|
||||
background-color: #FFC;
|
||||
display: none;
|
||||
font-size: 11px;
|
||||
border: 1px solid #FFB;
|
||||
}
|
||||
|
||||
div.frm_tip_box table {
|
||||
border-collapse: collapse;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
td.frm_tray_area {
|
||||
width: 122px;
|
||||
}
|
||||
|
||||
div.dialog_frm {
|
||||
position: relative;
|
||||
margin: 10px;
|
||||
|
|
@ -142,19 +142,14 @@ div.time_field select{
|
|||
.datainputcell { padding: 2px 0px; }
|
||||
|
||||
|
||||
.field_description, .help {
|
||||
margin: 3px 0px 11px 0px;
|
||||
color: #888;
|
||||
font-style: italic;
|
||||
.help ol {
|
||||
padding-left: 19px;
|
||||
}
|
||||
|
||||
.field_description_top {
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
|
||||
.field_label {
|
||||
font-size:11px;
|
||||
}
|
||||
.input_area input, select, textarea {
|
||||
font-size: 14px;
|
||||
padding: 2px;
|
||||
|
|
@ -205,7 +200,6 @@ div.sidebar-comment-wrapper input {
|
|||
}
|
||||
div.sidebar-comment-message {
|
||||
margin-top: 8px;
|
||||
font-size: 11px;
|
||||
color: #777;
|
||||
}
|
||||
|
||||
|
|
@ -216,6 +210,5 @@ div.sidebar-comment-text {
|
|||
color: #444;
|
||||
}
|
||||
div.sidebar-comment-info {
|
||||
font-size: 10px;
|
||||
color: #777;
|
||||
}
|
||||
|
|
@ -1,14 +1,4 @@
|
|||
/* listing 2.0 */
|
||||
|
||||
div.listing-more {
|
||||
margin: 7px 0px 17px 0px;
|
||||
text-align: center;
|
||||
display: none;
|
||||
}
|
||||
|
||||
div.listing-toolbar {
|
||||
margin: 7px 0px;
|
||||
}
|
||||
|
||||
/* SRS */
|
||||
|
||||
|
|
@ -50,7 +40,4 @@ div.srs_filter_area {
|
|||
|
||||
div.srs_filter_area td {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -14,9 +14,8 @@ div.psidebar div.section {
|
|||
}
|
||||
|
||||
div.psidebar div.section-head {
|
||||
font-size: 12px;
|
||||
padding: 5px 11px;
|
||||
border-bottom: 2px solid #444;
|
||||
border-bottom: 1px solid #aaa;
|
||||
}
|
||||
|
||||
div.psidebar div.section-body {
|
||||
|
|
@ -28,6 +27,5 @@ div.psidebar div.section-item {
|
|||
}
|
||||
|
||||
div.psidebar div.section-item, div.psidebar .section-link {
|
||||
font-size: 11px;
|
||||
color: #666;
|
||||
}
|
||||
|
|
@ -1,20 +1,21 @@
|
|||
/*
|
||||
* jQuery UI CSS Framework
|
||||
* Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
|
||||
*/
|
||||
* jQuery UI CSS Framework 1.8.18
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Theming/API
|
||||
*/
|
||||
|
||||
/* Layout helpers
|
||||
----------------------------------*/
|
||||
.ui-helper-hidden { display: none; }
|
||||
.ui-helper-hidden-accessible { position: absolute; left: -99999999px; }
|
||||
.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
|
||||
.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
|
||||
.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
|
||||
.ui-helper-clearfix { display: inline-block; }
|
||||
/* required comment for clearfix to work in Opera \*/
|
||||
* html .ui-helper-clearfix { height:1%; }
|
||||
.ui-helper-clearfix { display:block; }
|
||||
/* end clearfix */
|
||||
.ui-helper-clearfix:before, .ui-helper-clearfix:after { content: ""; display: table; }
|
||||
.ui-helper-clearfix:after { clear: both; }
|
||||
.ui-helper-clearfix { zoom: 1; }
|
||||
.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
|
||||
|
||||
|
||||
|
|
@ -26,7 +27,7 @@
|
|||
/* Icons
|
||||
----------------------------------*/
|
||||
|
||||
/* states and images */
|
||||
/* states and ../lib/images */
|
||||
.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
|
||||
|
||||
|
||||
|
|
@ -38,56 +39,61 @@
|
|||
|
||||
|
||||
/*
|
||||
* jQuery UI CSS Framework
|
||||
* Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
|
||||
* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Arial,sans-serif&fwDefault=normal&fsDefault=1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=03_highlight_soft.png&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=01_flat.png&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=04_highlight_hard.png&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=222&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=04_highlight_hard.png&bgImgOpacityHover=75&borderColorHover=999999&fcHover=000&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=04_highlight_hard.png&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=000&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=02_glass.png&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=02_glass.png&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
|
||||
*/
|
||||
* jQuery UI CSS Framework 1.8.18
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Theming/API
|
||||
*
|
||||
* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS,%20Tahoma,%20Verdana,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=f6a828&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=35&borderColorHeader=e78f08&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=eeeeee&bgTextureContent=03_highlight_soft.png&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=333333&iconColorContent=222222&bgColorDefault=f6f6f6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=100&borderColorDefault=cccccc&fcDefault=1c94c4&iconColorDefault=ef8c08&bgColorHover=fdf5ce&bgTextureHover=02_glass.png&bgImgOpacityHover=100&borderColorHover=fbcb09&fcHover=c77405&iconColorHover=ef8c08&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=fbd850&fcActive=eb8f00&iconColorActive=ef8c08&bgColorHighlight=ffe45c&bgTextureHighlight=03_highlight_soft.png&bgImgOpacityHighlight=75&borderColorHighlight=fed22f&fcHighlight=363636&iconColorHighlight=228ef1&bgColorError=b81900&bgTextureError=08_diagonals_thick.png&bgImgOpacityError=18&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffd27a&bgColorOverlay=666666&bgTextureOverlay=08_diagonals_thick.png&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=01_flat.png&bgImgOpacityShadow=10&opacityShadow=20&thicknessShadow=5px&offsetTopShadow=-5px&offsetLeftShadow=-5px&cornerRadiusShadow=5px
|
||||
*/
|
||||
|
||||
|
||||
/* Component containers
|
||||
----------------------------------*/
|
||||
.ui-widget { font-family: Arial,sans-serif; font-size: 1em; }
|
||||
.ui-widget { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1.1em; }
|
||||
.ui-widget .ui-widget { font-size: 1em; }
|
||||
.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Arial,sans-serif; font-size: 1em; }
|
||||
.ui-widget-content { border: 1px solid #aaaaaa; background: #ffffff url(lib/images/jquery-ui/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x; color: #222222; }
|
||||
.ui-widget-content a { color: #222222; }
|
||||
.ui-widget-header { border: 1px solid #aaaaaa; background: #cccccc url(lib/images/jquery-ui/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x; color: #222222; font-weight: bold; }
|
||||
.ui-widget-header a { color: #222222; }
|
||||
.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1em; }
|
||||
.ui-widget-content { border: 1px solid #dddddd; background: #eeeeee url(../lib/images/jquery.ui/ui-bg_highlight-soft_100_eeeeee_1x100.png) 50% top repeat-x; color: #333333; }
|
||||
.ui-widget-content a { color: #333333; }
|
||||
.ui-widget-header { border: 1px solid #e78f08; background: #f6a828 url(../lib/images/jquery.ui/ui-bg_gloss-wave_35_f6a828_500x100.png) 50% 50% repeat-x; color: #ffffff; font-weight: bold; }
|
||||
.ui-widget-header a { color: #ffffff; }
|
||||
|
||||
/* Interaction states
|
||||
----------------------------------*/
|
||||
.ui-state-default, .ui-widget-content .ui-state-default { border: 1px solid #d3d3d3; background: #e6e6e6 url(lib/images/jquery-ui/ui-bg_highlight-hard_75_e6e6e6_1x100.png) 50% 50% repeat-x; font-weight: normal; color: #222; }
|
||||
.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #222; text-decoration: none; }
|
||||
.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus { border: 1px solid #999999; background: #dadada url(lib/images/jquery-ui/ui-bg_highlight-hard_75_dadada_1x100.png) 50% 50% repeat-x; font-weight: normal; color: #000; }
|
||||
.ui-state-hover a, .ui-state-hover a:hover { color: #000; text-decoration: none; }
|
||||
.ui-state-active, .ui-widget-content .ui-state-active { border: 1px solid #aaaaaa; background: #ffffff url(lib/images/jquery-ui/ui-bg_highlight-hard_65_ffffff_1x100.png) 50% 50% repeat-x; font-weight: normal; color: #000; }
|
||||
.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #000; text-decoration: none; }
|
||||
.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #cccccc; background: #f6f6f6 url(../lib/images/jquery.ui/ui-bg_glass_100_f6f6f6_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #1c94c4; }
|
||||
.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #1c94c4; text-decoration: none; }
|
||||
.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #fbcb09; background: #fdf5ce url(../lib/images/jquery.ui/ui-bg_glass_100_fdf5ce_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #c77405; }
|
||||
.ui-state-hover a, .ui-state-hover a:hover { color: #c77405; text-decoration: none; }
|
||||
.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #fbd850; background: #ffffff url(../lib/images/jquery.ui/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #eb8f00; }
|
||||
.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #eb8f00; text-decoration: none; }
|
||||
.ui-widget :active { outline: none; }
|
||||
|
||||
/* Interaction Cues
|
||||
----------------------------------*/
|
||||
.ui-state-highlight, .ui-widget-content .ui-state-highlight {border: 1px solid #fcefa1; background: #fbf9ee url(lib/images/jquery-ui/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x; color: #363636; }
|
||||
.ui-state-highlight a, .ui-widget-content .ui-state-highlight a { color: #363636; }
|
||||
.ui-state-error, .ui-widget-content .ui-state-error {border: 1px solid #cd0a0a; background: #fef1ec url(lib/images/jquery-ui/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x; color: #cd0a0a; }
|
||||
.ui-state-error a, .ui-widget-content .ui-state-error a { color: #cd0a0a; }
|
||||
.ui-state-error-text, .ui-widget-content .ui-state-error-text { color: #cd0a0a; }
|
||||
.ui-priority-primary, .ui-widget-content .ui-priority-primary { font-weight: bold; }
|
||||
.ui-priority-secondary, .ui-widget-content .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
|
||||
.ui-state-disabled, .ui-widget-content .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
|
||||
.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fed22f; background: #ffe45c url(../lib/images/jquery.ui/ui-bg_highlight-soft_75_ffe45c_1x100.png) 50% top repeat-x; color: #363636; }
|
||||
.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
|
||||
.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #b81900 url(../lib/images/jquery.ui/ui-bg_diagonals-thick_18_b81900_40x40.png) 50% 50% repeat; color: #ffffff; }
|
||||
.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #ffffff; }
|
||||
.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #ffffff; }
|
||||
.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
|
||||
.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
|
||||
.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
|
||||
|
||||
/* Icons
|
||||
----------------------------------*/
|
||||
|
||||
/* states and images */
|
||||
.ui-icon { width: 16px; height: 16px; background-image: url(lib/images/jquery-ui/ui-icons_222222_256x240.png); }
|
||||
.ui-widget-content .ui-icon {background-image: url(lib/images/jquery-ui/ui-icons_222222_256x240.png); }
|
||||
.ui-widget-header .ui-icon {background-image: url(lib/images/jquery-ui/ui-icons_222222_256x240.png); }
|
||||
.ui-state-default .ui-icon { background-image: url(lib/images/jquery-ui/ui-icons_888888_256x240.png); }
|
||||
.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(lib/images/jquery-ui/ui-icons_454545_256x240.png); }
|
||||
.ui-state-active .ui-icon {background-image: url(lib/images/jquery-ui/ui-icons_454545_256x240.png); }
|
||||
.ui-state-highlight .ui-icon {background-image: url(lib/images/jquery-ui/ui-icons_2e83ff_256x240.png); }
|
||||
.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(lib/images/jquery-ui/ui-icons_cd0a0a_256x240.png); }
|
||||
/* states and ../lib/images */
|
||||
.ui-icon { width: 16px; height: 16px; background-image: url(../lib/images/jquery.ui/ui-icons_222222_256x240.png); }
|
||||
.ui-widget-content .ui-icon {background-image: url(../lib/images/jquery.ui/ui-icons_222222_256x240.png); }
|
||||
.ui-widget-header .ui-icon {background-image: url(../lib/images/jquery.ui/ui-icons_ffffff_256x240.png); }
|
||||
.ui-state-default .ui-icon { background-image: url(../lib/images/jquery.ui/ui-icons_ef8c08_256x240.png); }
|
||||
.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(../lib/images/jquery.ui/ui-icons_ef8c08_256x240.png); }
|
||||
.ui-state-active .ui-icon {background-image: url(../lib/images/jquery.ui/ui-icons_ef8c08_256x240.png); }
|
||||
.ui-state-highlight .ui-icon {background-image: url(../lib/images/jquery.ui/ui-icons_228ef1_256x240.png); }
|
||||
.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(../lib/images/jquery.ui/ui-icons_ffd27a_256x240.png); }
|
||||
|
||||
/* positioning */
|
||||
.ui-icon-carat-1-n { background-position: 0 0; }
|
||||
|
|
@ -271,53 +277,76 @@
|
|||
----------------------------------*/
|
||||
|
||||
/* Corner radius */
|
||||
.ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; }
|
||||
.ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; }
|
||||
.ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
|
||||
.ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
|
||||
.ui-corner-top { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; }
|
||||
.ui-corner-bottom { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
|
||||
.ui-corner-right { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
|
||||
.ui-corner-left { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
|
||||
.ui-corner-all { -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; }
|
||||
.ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; -khtml-border-top-left-radius: 4px; border-top-left-radius: 4px; }
|
||||
.ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; -khtml-border-top-right-radius: 4px; border-top-right-radius: 4px; }
|
||||
.ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; -khtml-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
|
||||
.ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; -khtml-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
|
||||
|
||||
/* Overlays */
|
||||
.ui-widget-overlay { background: #aaaaaa url(lib/images/jquery-ui/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); }
|
||||
.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(lib/images/jquery-ui/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }/* Button
|
||||
----------------------------------*/
|
||||
|
||||
.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */
|
||||
.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
|
||||
button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */
|
||||
.ui-button-icons-only { width: 3em; }
|
||||
button.ui-button-icons-only { width: 3.2em; }
|
||||
|
||||
/*button text element */
|
||||
.ui-button .ui-button-text { display: block; line-height: 1.2; }
|
||||
.ui-button-text-only .ui-button-text { padding: .3em 1em; }
|
||||
.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .3em; text-indent: -9999999px; }
|
||||
.ui-button-text-icon .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .3em 1em .3em 1.8em; }
|
||||
.ui-button-text-icons .ui-button-text { padding-right: 1.8em; }
|
||||
/* no icon support for input elements, provide padding by default */
|
||||
input.ui-button { padding: .3em 1em; }
|
||||
|
||||
/*button icon element(s) */
|
||||
.ui-button-icon-only .ui-icon, .ui-button-text-icon .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; }
|
||||
.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }
|
||||
.ui-button-text-icon .ui-icon-primary, .ui-button-text-icons .ui-icon-primary, .ui-button-icons-only .ui-icon-primary { left: .5em; }
|
||||
.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
|
||||
|
||||
/*button sets*/
|
||||
.ui-button-set { margin-right: 7px; }
|
||||
.ui-button-set .ui-button { margin-left: 0; margin-right: -.3em; }
|
||||
.ui-widget-overlay { background: #666666 url(../lib/images/jquery.ui/ui-bg_diagonals-thick_20_666666_40x40.png) 50% 50% repeat; opacity: .50;filter:Alpha(Opacity=50); }
|
||||
.ui-widget-shadow { margin: -5px 0 0 -5px; padding: 5px; background: #000000 url(../lib/images/jquery.ui/ui-bg_flat_10_000000_40x100.png) 50% 50% repeat-x; opacity: .20;filter:Alpha(Opacity=20); -moz-border-radius: 5px; -khtml-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; }/*
|
||||
* jQuery UI Autocomplete 1.8.18
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Autocomplete#theming
|
||||
*/
|
||||
.ui-autocomplete { position: absolute; cursor: default; }
|
||||
|
||||
/* workarounds */
|
||||
button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
|
||||
* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
|
||||
|
||||
|
||||
/* Datepicker
|
||||
----------------------------------*/
|
||||
.ui-datepicker { width: 17em; padding: .2em .2em 0; }
|
||||
/*
|
||||
* jQuery UI Menu 1.8.18
|
||||
*
|
||||
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Menu#theming
|
||||
*/
|
||||
.ui-menu {
|
||||
list-style:none;
|
||||
padding: 2px;
|
||||
margin: 0;
|
||||
display:block;
|
||||
float: left;
|
||||
}
|
||||
.ui-menu .ui-menu {
|
||||
margin-top: -3px;
|
||||
}
|
||||
.ui-menu .ui-menu-item {
|
||||
margin:0;
|
||||
padding: 0;
|
||||
zoom: 1;
|
||||
float: left;
|
||||
clear: left;
|
||||
width: 100%;
|
||||
}
|
||||
.ui-menu .ui-menu-item a {
|
||||
text-decoration:none;
|
||||
display:block;
|
||||
padding:.2em .4em;
|
||||
line-height:1.5;
|
||||
zoom:1;
|
||||
}
|
||||
.ui-menu .ui-menu-item a.ui-state-hover,
|
||||
.ui-menu .ui-menu-item a.ui-state-active {
|
||||
font-weight: normal;
|
||||
margin: -1px;
|
||||
}
|
||||
/*
|
||||
* jQuery UI Datepicker 1.8.18
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Datepicker#theming
|
||||
*/
|
||||
.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; }
|
||||
.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
|
||||
.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
|
||||
.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
|
||||
|
|
@ -349,7 +378,7 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra pad
|
|||
.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
|
||||
.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
|
||||
.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
|
||||
.ui-datepicker-row-break { clear:both; width:100%; }
|
||||
.ui-datepicker-row-break { clear:both; width:100%; font-size:0em; }
|
||||
|
||||
/* RTL support */
|
||||
.ui-datepicker-rtl { direction: rtl; }
|
||||
|
|
@ -375,9 +404,4 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra pad
|
|||
left: -4px; /*must have*/
|
||||
width: 200px; /*must have*/
|
||||
height: 200px; /*must have*/
|
||||
}
|
||||
|
||||
/* There must be a better way to do this - Rushabh */
|
||||
#ui-datepicker-div {
|
||||
z-index: 9999;
|
||||
}
|
||||
34
css/ui/fonts.css
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
@font-face {
|
||||
font-family: 'Pontano Sans';
|
||||
font-style: normal;
|
||||
font-weight: 800;
|
||||
src: url('../lib/css/fonts/pontanosans.woff') format('woff');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Droid Sans';
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
src: local('Droid Sans'), local('DroidSans'), url('../lib/css/fonts/droidsans.woff') format('woff');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'PT Sans';
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
src: local('PT Sans'), local('PTSans-Regular'), url('../lib/css/fonts/ptsans.woff') format('woff');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Open Sans';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: local('Open Sans'), local('OpenSans'), url('../lib/css/fonts/opensans.woff') format('woff');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Lato';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: local('Lato Regular'), local('Lato-Regular'), url('../lib/css/fonts/lato.woff') format('woff');
|
||||
}
|
||||
|
||||
144
css/ui/list.css
Normal file
|
|
@ -0,0 +1,144 @@
|
|||
.hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.list-filters {
|
||||
margin: 7px 0px;
|
||||
}
|
||||
|
||||
.wnlist .img-load {
|
||||
display: none;
|
||||
float: left;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
/* list-row */
|
||||
div.list-row {
|
||||
border-bottom: 1px solid #eee;
|
||||
padding: 5px 0px;
|
||||
}
|
||||
div.list-row:hover {
|
||||
background-color: #eef
|
||||
}
|
||||
|
||||
div.list-row .label {
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
div.list-row table {
|
||||
table-layout: fixed;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
div.list-row table td {
|
||||
overflow: hidden;
|
||||
padding-right: 3px;
|
||||
vertical-align: middle;
|
||||
height: 24px;
|
||||
max-height: 24px;
|
||||
}
|
||||
|
||||
div.paging-button {
|
||||
text-align: center;
|
||||
padding: 11px 0px;
|
||||
}
|
||||
|
||||
div.show_filters {
|
||||
display: none;
|
||||
}
|
||||
|
||||
div.filter_list {
|
||||
padding: 13px;
|
||||
}
|
||||
|
||||
div.show_filters.well {
|
||||
margin-top: 11px;
|
||||
margin-bottom: 11px;
|
||||
}
|
||||
|
||||
div.filter_list .run_btn {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
div.filter_list .add_filter {
|
||||
margin: 3px 0px;
|
||||
}
|
||||
|
||||
div.list_filter {
|
||||
margin: 7px 0px;
|
||||
}
|
||||
|
||||
div.list_filter input, div.list_filter select {
|
||||
width: 130px;
|
||||
margin-right: 7px;
|
||||
}
|
||||
|
||||
/* bar */
|
||||
|
||||
span.bar-outer {
|
||||
display: inline-block;
|
||||
margin: 0px 7px;
|
||||
margin-top: 3px;
|
||||
background-color: #fff;
|
||||
border: 1px solid #aaa;
|
||||
height: 10px;
|
||||
}
|
||||
|
||||
span.bar-inner {
|
||||
display: inline-block;
|
||||
background-color: #bdf;
|
||||
height: 100%;
|
||||
margin-bottom: 2px;
|
||||
float: left;
|
||||
}
|
||||
span.bar-complete {
|
||||
background-color: #009900;
|
||||
}
|
||||
span.bar-empty {
|
||||
background-color: #990000;
|
||||
}
|
||||
|
||||
|
||||
/* stats */
|
||||
|
||||
div.stat-wrapper {
|
||||
margin-bottom: 19px;
|
||||
}
|
||||
|
||||
div.stat-grid {
|
||||
border: 2px solid #bbb;
|
||||
background-color: white;
|
||||
border-radius: 5px;
|
||||
-moz-border-radius: 5px;
|
||||
-webkit-border-radius: 5px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
div.stat-label {
|
||||
position: relative;
|
||||
padding: 3px;
|
||||
text-align: center;
|
||||
}
|
||||
div.stat-label, div.stat-label a {
|
||||
z-index: 5;
|
||||
}
|
||||
|
||||
div.stat-item {
|
||||
position: relative;
|
||||
border-bottom: 1px solid #ddd;
|
||||
}
|
||||
div.stat-item:last-child {
|
||||
border-bottom: 0px solid #ddd;
|
||||
}
|
||||
|
||||
div.stat-bar {
|
||||
position: absolute;
|
||||
left: 0px;
|
||||
background-color: #def;
|
||||
height: 100%;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 180 B |
|
Before Width: | Height: | Size: 178 B |
|
Before Width: | Height: | Size: 120 B |
|
Before Width: | Height: | Size: 119 B |
|
Before Width: | Height: | Size: 93 B |
|
Before Width: | Height: | Size: 97 B |
|
Before Width: | Height: | Size: 94 B |
|
Before Width: | Height: | Size: 101 B |
|
Before Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 4.3 KiB |
256
js/core.min.js
vendored
|
|
@ -12,13 +12,6 @@ if(!window.wn)wn={}
|
|||
wn.provide=function(namespace){var nsl=namespace.split('.');var l=nsl.length;var parent=window;for(var i=0;i<l;i++){var n=nsl[i];if(!parent[n]){parent[n]={}}
|
||||
parent=parent[n];}}
|
||||
wn.provide('wn.settings');wn.provide('wn.ui');
|
||||
/*
|
||||
* lib/js/wn/xmlhttp.js
|
||||
*/
|
||||
wn.xmlhttp={request:function(){if(window.XMLHttpRequest)
|
||||
return new XMLHttpRequest();else if(window.ActiveXObject)
|
||||
return new ActiveXObject("MsXml2.XmlHttp");},complete:function(req,callback,url){if(req.status==200||req.status==304){callback(req.responseText);}else{alert(url+' request error: '+req.statusText+' ('+req.status+')');}},get:function(url,callback,args,async){if(async===null)async=true;var req=wn.xmlhttp.request();req.onreadystatechange=function(){if(req.readyState==4){wn.xmlhttp.complete(req,callback,url)}}
|
||||
var sep=((args&&args.indexOf('?'))==-1)?'?':'&';var u=args?(url+sep+args):url;req.open('GET',u,async);req.send(null);if(!async){wn.xmlhttp.complete(req,callback,url)}}}
|
||||
/*
|
||||
* lib/js/wn/versions.js
|
||||
*/
|
||||
|
|
@ -30,9 +23,8 @@ localStorage.setItem('_version_number',window._version_number);}}}
|
|||
*/
|
||||
wn.assets={executed_:{},exists:function(src){if('localStorage'in window&&localStorage.getItem(src))
|
||||
return true},add:function(src,txt){if('localStorage'in window){localStorage.setItem(src,txt);}},get:function(src){return localStorage.getItem(src);},extn:function(src){if(src.indexOf('?')!=-1){src=src.split('?').slice(-1)[0];}
|
||||
return src.split('.').slice(-1)[0];},load:function(src){var t=src;wn.xmlhttp.get(t,function(txt){wn.assets.add(src,txt);},'q='+Math.floor(Math.random()*1000),false)},execute:function(src){if(!wn.assets.exists(src)){wn.assets.load(src);}
|
||||
var type=wn.assets.extn(src);if(wn.assets.handler[type]){wn.assets.handler[type](wn.assets.get(src),src);wn.assets.executed_[src]=1;}},handler:{js:function(txt,src){wn.dom.eval(txt);},css:function(txt,src){var se=document.createElement('style');se.type="text/css";if(se.styleSheet){se.styleSheet.cssText=txt;}else{se.appendChild(document.createTextNode(txt));}
|
||||
document.getElementsByTagName('head')[0].appendChild(se);},cgi:function(txt,src){wn.dom.eval(txt)}}}
|
||||
return src.split('.').slice(-1)[0];},load:function(src){var t=src;$.ajax({url:t,data:{q:Math.floor(Math.random()*1000)},dataType:'text',success:function(txt){wn.assets.add(src,txt);},async:false})},execute:function(src){if(!wn.assets.exists(src)){wn.assets.load(src);}
|
||||
var type=wn.assets.extn(src);if(wn.assets.handler[type]){wn.assets.handler[type](wn.assets.get(src),src);wn.assets.executed_[src]=1;}},handler:{js:function(txt,src){wn.dom.eval(txt);},css:function(txt,src){wn.dom.set_style(txt);},cgi:function(txt,src){wn.dom.eval(txt)}}}
|
||||
/*
|
||||
* lib/js/wn/require.js
|
||||
*/
|
||||
|
|
@ -42,7 +34,9 @@ var l=items.length;for(var i=0;i<l;i++){var src=items[i];if(!(src in wn.assets.e
|
|||
* lib/js/wn/dom.js
|
||||
*/
|
||||
wn.provide('wn.dom');wn.dom.by_id=function(id){return document.getElementById(id);}
|
||||
wn.dom.eval=function(txt){var el=document.createElement('script');el.appendChild(document.createTextNode(txt));document.getElementsByTagName('head')[0].appendChild(el);}
|
||||
wn.dom.eval=function(txt){if(!txt)return;var el=document.createElement('script');el.appendChild(document.createTextNode(txt));document.getElementsByTagName('head')[0].appendChild(el);}
|
||||
wn.dom.set_style=function(txt){if(!txt)return;var se=document.createElement('style');se.type="text/css";if(se.styleSheet){se.styleSheet.cssText=txt;}else{se.appendChild(document.createTextNode(txt));}
|
||||
document.getElementsByTagName('head')[0].appendChild(se);}
|
||||
wn.dom.add=function(parent,newtag,className,cs,innerHTML,onclick){if(parent&&parent.substr)parent=wn.dom.by_id(parent);var c=document.createElement(newtag);if(parent)
|
||||
parent.appendChild(c);if(className){if(newtag.toLowerCase()=='img')
|
||||
c.src=className
|
||||
|
|
@ -50,15 +44,19 @@ else
|
|||
c.className=className;}
|
||||
if(cs)wn.dom.css(c,cs);if(innerHTML)c.innerHTML=innerHTML;if(onclick)c.onclick=onclick;return c;}
|
||||
wn.dom.css=function(ele,s){if(ele&&s){for(var i in s)ele.style[i]=s[i];};return ele;}
|
||||
wn.dom.hide=function(ele){ele.style.display='none';}
|
||||
wn.dom.show=function(ele,value){if(!value)value='block';ele.style.display=value;}
|
||||
wn.get_cookie=function(c){var t=""+document.cookie;var ind=t.indexOf(c);if(ind==-1||c=="")return"";var ind1=t.indexOf(';',ind);if(ind1==-1)ind1=t.length;return unescape(t.substring(ind+c.length+1,ind1));}
|
||||
wn.dom.set_box_shadow=function(ele,spread){$(ele).css('-moz-box-shadow','0px 0px '+spread+'px rgba(0,0,0,0.3);')
|
||||
$(ele).css('-webkit-box-shadow','0px 0px '+spread+'px rgba(0,0,0,0.3);')
|
||||
$(ele).css('-box-shadow','0px 0px '+spread+'px rgba(0,0,0,0.3);')}
|
||||
/*
|
||||
* lib/js/wn/page.js
|
||||
* lib/js/wn/model.js
|
||||
*/
|
||||
wn.page={set:function(src){var new_selection=$('.inner div.content[_src="'+src+'"]');if(!new_selection.length){wn.assets.execute(src);new_selection=$('.inner div.content[_src="'+src+'"]');}
|
||||
$('.inner .current_page').removeClass('current_page');new_selection.addClass('current_page');var title=$('nav ul li a[href*="'+src+'"]').attr('title')||'No Title'
|
||||
state=window.location.hash;if(state!=src){window.location.hash=state;}
|
||||
else{document.title=title;}}}
|
||||
wn.provide('wn.model');wn.model={no_value_type:['Section Break','Column Break','HTML','Table','Button','Image'],new_names:{},with_doctype:function(doctype,callback){if(locals.DocType[doctype]){callback();}else{wn.call({method:'webnotes.widgets.form.load.getdoctype',args:{doctype:doctype},callback:callback});}},with_doc:function(doctype,name,callback){if(!name)name=doctype;if(locals[doctype]&&locals[doctype][name]){callback(name);}else{if(name&&name.indexOf('New '+doctype)!=-1){name=LocalDB.create(doctype);callback(name);}else{wn.call({method:'webnotes.widgets.form.load.getdoc',args:{doctype:doctype,name:name},callback:function(r){callback(name);}});}}},can_delete:function(doctype){if(!doctype)return false;return locals.DocType[doctype].allow_trash&&wn.boot.profile.can_cancel.indexOf(doctype)!=-1;}}
|
||||
/*
|
||||
* lib/js/wn/misc/tools.js
|
||||
*/
|
||||
wn.markdown=function(txt){if(!wn.md2html){wn.require('lib/js/lib/showdown.js');wn.md2html=new Showdown.converter();}
|
||||
return wn.md2html.makeHtml(txt);}
|
||||
/*
|
||||
* lib/js/wn/misc/user.js
|
||||
*/
|
||||
|
|
@ -68,6 +66,8 @@ if(!wn.boot.user_info[uid])return def
|
|||
if(!wn.boot.user_info[uid].fullname)
|
||||
wn.boot.user_info[uid].fullname=uid;if(!wn.boot.user_info[uid].image)
|
||||
wn.boot.user_info[uid].image=def.image;return wn.boot.user_info[uid];}
|
||||
wn.session_alive=true;$(document).bind('mousemove',function(){wn.session_alive=true;if(wn.session_alive_timeout)
|
||||
clearTimeout(wn.session_alive_timeout);wn.session_alive_timeout=setTimeout('wn.session_alive=false;',30000);})
|
||||
/*
|
||||
* lib/js/lib/json2.js
|
||||
*/
|
||||
|
|
@ -96,6 +96,226 @@ text=String(text);cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function
|
|||
('0000'+a.charCodeAt(0).toString(16)).slice(-4);});}
|
||||
if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,'@').replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,']').replace(/(?:^|:|,)(?:\s*\[)+/g,''))){j=eval('('+text+')');return typeof reviver==='function'?walk({'':j},''):j;}
|
||||
throw new SyntaxError('JSON.parse');};}}());
|
||||
/*
|
||||
* lib/js/wn/router.js
|
||||
*/
|
||||
wn.route=function(){wn._cur_route=window.location.hash;route=wn.get_route();switch(route[0]){case"List":wn.views.doclistview.show(route[1]);break;case"Form":if(route.length>3){route[2]=route.splice(2).join('/');}
|
||||
wn.views.formview.show(route[1],route[2]);break;case"Report":wn.views.reportview.show(route[1],route[2]);break;default:wn.views.pageview.show(route[0]);}}
|
||||
wn.get_route=function(route){if(!route)
|
||||
route=window.location.hash;if(route.substr(0,1)=='#')route=route.substr(1);if(route.substr(0,1)=='!')route=route.substr(1);return $.map(route.split('/'),function(r){return decodeURIComponent(r);});}
|
||||
wn.set_route=function(){route=$.map(arguments,function(a){return encodeURIComponent(a)}).join('/');window.location.hash=route;}
|
||||
wn._cur_route=null;$(window).bind('hashchange',function(){if(location.hash==wn._cur_route)
|
||||
return;wn.route();if(wn.boot.analytics_code){try{eval(wn.boot.analytics_code);}catch(e){console.log(e);}}});
|
||||
/*
|
||||
* lib/js/wn/ui/listing.js
|
||||
*/
|
||||
wn.provide('wn.ui');wn.ui.Listing=Class.extend({init:function(opts){this.opts=opts||{};this.page_length=20;this.start=0;this.data=[];if(opts){this.make();}},prepare_opts:function(){if(this.opts.new_doctype){if(wn.boot.profile.can_read.indexOf(this.opts.new_doctype)==-1){this.opts.new_doctype=null;}else{this.opts.new_doctype=get_doctype_label(this.opts.new_doctype);}}
|
||||
if(!this.opts.no_result_message){this.opts.no_result_message='Nothing to show'}},make:function(opts){if(opts){this.opts=opts;}
|
||||
this.prepare_opts();$.extend(this,this.opts);$(this.parent).html(repl('\
|
||||
<div class="wnlist">\
|
||||
<h3 class="title hide">%(title)s</h3>\
|
||||
\
|
||||
<div class="list-filters hide">\
|
||||
<div class="show_filters well">\
|
||||
<div>\
|
||||
<button class="btn btn-small add-filter-btn">\
|
||||
<i class="icon-plus"></i> Add Filter</button>\
|
||||
</div>\
|
||||
<div class="filter_area"></div>\
|
||||
</div>\
|
||||
</div>\
|
||||
\
|
||||
<div style="height: 37px; margin-bottom:9px" class="list-toolbar-wrapper">\
|
||||
<div class="list-toolbar btn-group" style="display:inline-block; margin-right: 10px;">\
|
||||
<a class="btn btn-small btn-refresh btn-info">\
|
||||
<i class="icon-refresh icon-white"></i> Refresh</a>\
|
||||
<a class="btn btn-small btn-new">\
|
||||
<i class="icon-plus"></i> New</a>\
|
||||
<a class="btn btn-small btn-filter">\
|
||||
<i class="icon-search"></i> Filter</a>\
|
||||
</div>\
|
||||
<div style="display:inline-block; width: 24px; margin-left: 4px">\
|
||||
<img src="lib/images/ui/button-load.gif" \
|
||||
class="img-load"/></div>\
|
||||
</div><div style="clear:both"></div>\
|
||||
\
|
||||
<div class="no-result help hide">\
|
||||
%(no_result_message)s\
|
||||
</div>\
|
||||
\
|
||||
<div class="result">\
|
||||
<div class="result-list"></div>\
|
||||
<div class="result-grid hide"></div>\
|
||||
</div>\
|
||||
\
|
||||
<div class="paging-button">\
|
||||
<button class="btn btn-small btn-more hide">More...</div>\
|
||||
</div>\
|
||||
</div>\
|
||||
',this.opts));this.$w=$(this.parent).find('.wnlist');this.set_events();if(this.show_filters){this.make_filters();}},add_button:function(html,onclick,before){$(html).click(onclick).insertBefore(this.$w.find('.list-toolbar '+before));this.btn_groupify();},show_view:function($btn,$div,$btn_unsel,$div_unsel){$btn_unsel.removeClass('btn-info');$btn_unsel.find('i').removeClass('icon-white');$div_unsel.toggle(false);$btn.addClass('btn-info');$btn.find('i').addClass('icon-white');$div.toggle(true);},set_events:function(){var me=this;this.$w.find('.btn-refresh').click(function(){me.run();});this.$w.find('.btn-more').click(function(){me.run({append:true});});if(this.title){this.$w.find('h3').html(this.title).toggle(true);}
|
||||
if(this.new_doctype){this.$w.find('.btn-new').toggle(true).click(function(){newdoc(me.new_doctype);})}else{this.$w.find('.btn-new').remove();}
|
||||
if(!me.show_filters){this.$w.find('.btn-filter').remove();}
|
||||
if(this.hide_refresh||this.no_refresh){this.$w.find('.btn-refresh').remove();}
|
||||
this.btn_groupify();},btn_groupify:function(){var nbtns=this.$w.find('.list-toolbar a').length;if(nbtns==0){this.$w.find('.list-toolbar-wrapper').toggle(false);}},make_filters:function(){this.filter_list=new wn.ui.FilterList({listobj:this,$parent:this.$w.find('.list-filters').toggle(true),doctype:this.doctype,filter_fields:this.filter_fields});},clear:function(){this.data=[];this.$w.find('.result-list').empty();this.$w.find('.result').toggle(true);this.$w.find('.no-result').toggle(false);this.start=0;},run:function(){var me=this;var a0=arguments[0];var a1=arguments[1];if(a0&&typeof a0=='function')
|
||||
this.onrun=a0;if(a0&&a0.callback)
|
||||
this.onrun=a0.callback;if(!a1&&!(a0&&a0.append))
|
||||
this.start=0;me.set_working(true);wn.call({method:this.opts.method||'webnotes.widgets.query_builder.runquery',args:this.get_call_args(),callback:function(r){me.set_working(false);me.render_results(r)},no_spinner:this.opts.no_loading});},set_working:function(flag){this.$w.find('.img-load').toggle(flag);},get_call_args:function(){if(!this.method){this.query=this.get_query?this.get_query():this.query;this.add_limits();var args={query_max:this.query_max,as_dict:1}
|
||||
args.simple_query=this.query;}else{var args={limit_start:this.start,limit_page_length:this.page_length}}
|
||||
if(this.args)
|
||||
$.extend(args,this.args)
|
||||
if(this.get_args){$.extend(args,this.get_args());}
|
||||
return args;},render_results:function(r){if(this.start==0)this.clear();this.$w.find('.btn-more').toggle(false);if(r.message)r.values=r.message;if(r.values&&r.values.length){this.data=this.data.concat(r.values);this.render_list(r.values);}else{if(this.start==0){this.$w.find('.result').toggle(false);this.$w.find('.no-result').toggle(true);}}
|
||||
if(this.onrun)this.onrun();if(this.callback)this.callback(r);},render_list:function(values){var m=Math.min(values.length,this.page_length);for(var i=0;i<m;i++){this.render_row(this.add_row(),values[i],this,i);}
|
||||
this.start+=m;if(values.length>=this.page_length)
|
||||
this.$w.find('.btn-more').toggle(true);},add_row:function(){return this.$w.find('.result-list').append('<div class="list-row">').find('.list-row:last').get(0);},refresh:function(){this.run();},add_limits:function(){this.query+=' LIMIT '+this.start+','+(this.page_length+1);}});wn.ui.FilterList=Class.extend({init:function(opts){wn.require('lib/js/legacy/widgets/form/fields.js');$.extend(this,opts);this.filters=[];this.$w=this.$parent;this.set_events();},set_events:function(){var me=this;this.listobj.$w.find('.btn-filter').bind('click',function(){me.$w.find('.show_filters').slideToggle();if(!me.filters.length)
|
||||
me.add_filter();});this.$w.find('.add-filter-btn').bind('click',function(){me.add_filter();});},add_filter:function(fieldname,condition,value){this.filters.push(new wn.ui.Filter({flist:this,fieldname:fieldname,condition:condition,value:value}));if(fieldname){this.$w.find('.show_filters').slideDown();}},get_filters:function(){var values=[];$.each(this.filters,function(i,f){if(f.field)
|
||||
values.push(f.get_value());})
|
||||
return values;},update_filters:function(){var fl=[];$.each(this.filters,function(i,f){if(f.field)fl.push(f);})
|
||||
this.filters=fl;},get_filter:function(fieldname){for(var i in this.filters){if(this.filters[i].field.df.fieldname==fieldname)
|
||||
return this.filters[i];}}});wn.ui.Filter=Class.extend({init:function(opts){$.extend(this,opts);this.doctype=this.flist.doctype;this.fields_by_name={};this.make();this.make_options();this.set_events();},make:function(){this.flist.$w.find('.filter_area').append('<div class="list_filter">\
|
||||
<select class="fieldname_select"></select>\
|
||||
<select class="condition">\
|
||||
<option value="=">Equals</option>\
|
||||
<option value="like">Like</option>\
|
||||
<option value=">=">Greater or equals</option>\
|
||||
<option value=">=">Less or equals</option>\
|
||||
<option value=">">Greater than</option>\
|
||||
<option value="<">Less than</option>\
|
||||
<option value="in">In</option>\
|
||||
<option value="!=">Not equals</option>\
|
||||
</select>\
|
||||
<span class="filter_field"></span>\
|
||||
<a class="close">×</a>\
|
||||
</div>');this.$w=this.flist.$w.find('.list_filter:last-child');this.$select=this.$w.find('.fieldname_select');},make_options:function(){if(this.filter_fields){for(var i in this.filter_fields)
|
||||
this.add_field_option(this.filter_fields[i])}else{this.render_field_select();}},set_events:function(){var me=this;this.$w.find('.fieldname_select').bind('change',function(){me.set_field(this.value);});this.$w.find('a.close').bind('click',function(){me.$w.css('display','none');var value=me.field.get_value();me.field=null;if(!me.flist.get_filters().length){me.flist.$w.find('.set_filters').toggle(true);me.flist.$w.find('.show_filters').toggle(false);}
|
||||
if(value){me.flist.listobj.run();}
|
||||
me.flist.update_filters();return false;});me.$w.find('.condition').change(function(){if($(this).val()=='in'){me.set_field(me.field.df.fieldname,'Data');if(!me.field.desc_area)
|
||||
me.field.desc_area=$a(me.field.wrapper,'span','help',null,'values separated by comma');}else{me.set_field(me.field.df.fieldname);}});if(me.fieldname){this.set_values(me.fieldname,me.condition,me.value);}else{me.set_field('name');}},set_values:function(fieldname,condition,value){this.set_field(fieldname);if(condition)this.$w.find('.condition').val(condition).change();if(value)this.field.set_input(value)},render_field_select:function(){var me=this;me.table_fields=[];var std_filters=[{fieldname:'name',fieldtype:'Data',label:'ID',parent:me.doctype},{fieldname:'modified',fieldtype:'Date',label:'Last Modified',parent:me.doctype},{fieldname:'owner',fieldtype:'Data',label:'Created By',parent:me.doctype},{fieldname:'_user_tags',fieldtype:'Data',label:'Tags',parent:me.doctype}];$.each(std_filters.concat(fields_list[me.doctype]),function(i,df){me.add_field_option(df);});$.each(me.table_fields,function(i,table_df){if(table_df.options){$.each(fields_list[table_df.options],function(i,df){me.add_field_option(df);});}})},add_field_option:function(df){var me=this;if(me.doctype&&df.parent==me.doctype){var label=df.label;var table=get_label_doctype(me.doctype);if(df.fieldtype=='Table')me.table_fields.push(df);}else{var label=df.label+' ('+df.parent+')';var table=df.parent;}
|
||||
if(wn.model.no_value_type.indexOf(df.fieldtype)==-1&&!me.fields_by_name[df.fieldname]){this.$select.append($('<option>',{value:df.fieldname,table:table}).text(label));me.fields_by_name[df.fieldname]=df;}},set_field:function(fieldname,fieldtype){var me=this;var cur=me.field?{fieldname:me.field.df.fieldname,fieldtype:me.field.df.fieldtype}:{}
|
||||
var df=me.fields_by_name[fieldname];this.set_fieldtype(df,fieldtype);if(me.field&&cur.fieldname==fieldname&&df.fieldtype==cur.fieldtype){return;}
|
||||
me.$w.find('.fieldname_select').val(fieldname);var field_area=me.$w.find('.filter_field').empty().get(0);f=make_field(df,null,field_area,null,0,1);f.df.single_select=1;f.not_in_form=1;f.with_label=0;f.refresh();me.field=f;this.set_default_condition(df,fieldtype);$(me.field.wrapper).find(':input').keydown(function(ev){if(ev.which==13){me.flist.listobj.run();}})},set_fieldtype:function(df,fieldtype){if(df.original_type)
|
||||
df.fieldtype=df.original_type;else
|
||||
df.original_type=df.fieldtype;df.description='';df.reqd=0;if(fieldtype){df.fieldtype=fieldtype;return;}
|
||||
if(df.fieldtype=='Check'){df.fieldtype='Select';df.options='No\nYes';}else if(['Text','Text Editor','Code','Link'].indexOf(df.fieldtype)!=-1){df.fieldtype='Data';}},set_default_condition:function(df,fieldtype){if(!fieldtype){if(df.fieldtype=='Data'){this.$w.find('.condition').val('like');}else{this.$w.find('.condition').val('=');}}},get_value:function(){var me=this;var val=me.field.get_value();var cond=me.$w.find('.condition').val();if(me.field.df.original_type=='Check'){val=(val=='Yes'?1:0);}
|
||||
if(cond=='like'){val=val+'%';}
|
||||
return[me.$w.find('.fieldname_select option:selected').attr('table'),me.field.df.fieldname,me.$w.find('.condition').val(),cstr(val)];}});
|
||||
/*
|
||||
* lib/js/wn/views/container.js
|
||||
*/
|
||||
wn.provide('wn.pages');wn.provide('wn.views');wn.views.Container=Class.extend({init:function(){this.container=$('#body_div').get(0);this.page=null;this.pagewidth=$('#body_div').width();this.pagemargin=50;},add_page:function(label,onshow,onhide){var page=$('<div class="content"></div>').appendTo(this.container).get(0);if(onshow)
|
||||
$(page).bind('show',onshow);if(onshow)
|
||||
$(page).bind('hide',onhide);page.label=label;wn.pages[label]=page;return page;},change_to:function(label){if(this.page&&this.page.label==label){return;}
|
||||
var me=this;if(label.tagName){var page=label;}else{var page=wn.pages[label];}
|
||||
if(!page){console.log('Page not found '+label);return;}
|
||||
if(this.page){$(this.page).toggle(false);$(this.page).trigger('hide');}
|
||||
this.page=page;$(this.page).fadeIn();$(this.page).trigger('show');this.page._route=window.location.hash;document.title=this.page.label;return this.page;}})
|
||||
/*
|
||||
* lib/js/wn/views/doclistview.js
|
||||
*/
|
||||
wn.provide('wn.views.doclistview');wn.provide('wn.doclistviews');wn.views.doclistview.pages={};wn.views.doclistview.show=function(doctype){var pagename=doctype+' List';var doctype=get_label_doctype(doctype);wn.model.with_doctype(doctype,function(){var page=wn.views.doclistview.pages[pagename];if(!page){var page=wn.container.add_page(pagename);page.doclistview=new wn.views.DocListView(doctype,page);wn.views.doclistview.pages[pagename]=page;}
|
||||
document.title=page.doclistview.label;wn.container.change_to(pagename);})}
|
||||
wn.views.DocListView=wn.ui.Listing.extend({init:function(doctype,page){this.doctype=doctype;this.$page=$(page);this.label=get_doctype_label(doctype);this.label=(this.label.toLowerCase().substr(-4)=='list')?this.label:(this.label+' List');this.make_page();this.setup();},make_page:function(){var me=this;this.$page.html(repl('<div class="layout-wrapper layout-wrapper-background">\
|
||||
<div class="layout-main-section">\
|
||||
<a class="close" onclick="window.history.back();">×</a>\
|
||||
<h1>%(label)s</h1>\
|
||||
<hr>\
|
||||
<div class="wnlist-area"><div class="help">Loading...</div></div>\
|
||||
</div>\
|
||||
<div class="layout-side-section">\
|
||||
<div class="stat-wrapper show-docstatus hide">\
|
||||
<h4>Show</h4>\
|
||||
<div><input data-docstatus="0" type="checkbox" checked="checked" /> Drafts</div>\
|
||||
<div><input data-docstatus="1" type="checkbox" checked="checked" /> Submitted</div>\
|
||||
<div><input data-docstatus="2" type="checkbox" /> Cancelled</div>\
|
||||
</div>\
|
||||
</div>\
|
||||
<div style="clear: both"></div>\
|
||||
</div>',{label:this.label}));},setup:function(){var me=this;me.can_delete=wn.model.can_delete(me.doctype);me.meta=locals.DocType[me.doctype];me.$page.find('.wnlist-area').empty(),me.setup_docstatus_filter();me.setup_listview();me.init_list();me.init_stats();me.add_delete_option();},setup_docstatus_filter:function(){var me=this;this.can_submit=$.map(locals.DocPerm,function(d){if(d.parent==me.meta.name&&d.submit)return 1
|
||||
else return null;}).length;if(this.can_submit){this.$page.find('.show-docstatus').removeClass('hide');this.$page.find('.show-docstatus input').click(function(){me.run();})}},setup_listview:function(){if(this.meta.__listjs){eval(this.meta.__listjs);this.listview=new wn.doclistviews[this.doctype](this);}else{this.listview=new wn.views.ListView(this);}
|
||||
this.listview.parent=this;},init_list:function(){this.make({method:'webnotes.widgets.doclistview.get',get_args:this.get_args,parent:this.$page.find('.wnlist-area'),start:0,page_length:20,show_filters:true,show_grid:true,new_doctype:this.doctype,allow_delete:true,no_result_message:this.make_no_result(),columns:this.listview.fields});this.run();},make_no_result:function(){return repl('<div class="well"><p>No %(doctype_label)s found</p>\
|
||||
%(description)s\
|
||||
<hr>\
|
||||
<p><button class="btn btn-info btn-small"\
|
||||
onclick="wn.set_route(\'Form\', \'%(doctype)s\', \'New %(doctype)s\');"\
|
||||
>Make a new %(doctype_label)s</button>\
|
||||
</p></div>',{doctype_label:get_doctype_label(this.doctype),doctype:this.doctype,description:wn.markdown(locals.DocType[this.doctype].description||'')});},render_row:function(row,data){data.doctype=this.doctype;this.listview.render(row,data,this);},get_query_fields:function(){return this.listview.fields;},get_args:function(){return{doctype:this.doctype,fields:this.get_query_fields(),filters:this.filter_list.get_filters(),docstatus:this.can_submit?$.map(this.$page.find('.show-docstatus :checked'),function(inp){return $(inp).attr('data-docstatus')}):[]}},add_delete_option:function(){var me=this;if(this.can_delete){this.add_button('<a class="btn btn-small btn-delete">\
|
||||
<i class="icon-remove"></i> Delete</a>',function(){me.delete_items();},'.btn-filter')}},delete_items:function(){var me=this;var dl=$.map(me.$page.find('.list-delete:checked'),function(e){return $(e).data('name');});if(!dl.length)
|
||||
return;if(!confirm('This is PERMANENT action and you cannot undo. Continue?')){return;}
|
||||
me.set_working(true);wn.call({method:'webnotes.widgets.doclistview.delete_items',args:{items:dl,doctype:me.doctype},callback:function(){me.set_working(false);me.refresh();}})},init_stats:function(){var me=this
|
||||
wn.call({method:'webnotes.widgets.doclistview.get_stats',args:{stats:me.listview.stats,doctype:me.doctype},callback:function(r){$.each(r.message,function(field,stat){me.render_stat(field,stat);});}});},render_stat:function(field,stat){var me=this;if(!stat||!stat.length){if(field=='_user_tags'){this.$page.find('.layout-side-section').append('<div class="stat-wrapper"><h4>Tags</h4>\
|
||||
<div class="help small"><i>No records tagged.</i><br><br> \
|
||||
To add a tag, open the document and click on \
|
||||
"Add Tag" on the sidebar</div></div>');}
|
||||
return;}
|
||||
var label=fields[this.doctype][field]?fields[this.doctype][field].label:field;if(label=='_user_tags')label='Tags';var $w=$('<div class="stat-wrapper">\
|
||||
<h4>'+label+'</h4>\
|
||||
<div class="stat-grid">\
|
||||
</div>\
|
||||
</div>');stat=stat.sort(function(a,b){return b[1]-a[1]});var sum=0;$.each(stat,function(i,v){sum=sum+v[1];})
|
||||
$.each(stat,function(i,v){me.render_stat_item(i,v,sum,field).appendTo($w.find('.stat-grid'));});$w.appendTo(this.$page.find('.layout-side-section'));},render_stat_item:function(i,v,max,field){var me=this;var args={}
|
||||
args.label=v[0];args.width=flt(v[1])/max*100;args.count=v[1];args.field=field;$item=$(repl('<div class="stat-item">\
|
||||
<div class="stat-bar" style="width: %(width)s%"></div>\
|
||||
<div class="stat-label">\
|
||||
<a href="#" data-label="%(label)s" data-field="%(field)s">\
|
||||
%(label)s</a> \
|
||||
(%(count)s)</div>\
|
||||
</div>',args));this.setup_stat_item_click($item);return $item;},setup_stat_item_click:function($item){var me=this;$item.find('a').click(function(){var fieldname=$(this).attr('data-field');var label=$(this).attr('data-label');me.set_filter(fieldname,label);return false;});},set_filter:function(fieldname,label){var filter=this.filter_list.get_filter(fieldname);if(filter){var v=filter.field.get_value();if(v.indexOf(label)!=-1){return false;}else{if(fieldname=='_user_tags'){this.filter_list.add_filter(fieldname,'like','%'+label);}else{filter.set_values(fieldname,'in',v+', '+label);}}}else{if(fieldname=='_user_tags'){this.filter_list.add_filter(fieldname,'like','%'+label);}else{this.filter_list.add_filter(fieldname,'=',label);}}
|
||||
this.run();}});wn.views.ListView=Class.extend({init:function(doclistview){this.doclistview=doclistview;this.doctype=doclistview.doctype;var t="`tab"+this.doctype+"`.";this.fields=[t+'name',t+'owner',t+'docstatus',t+'_user_tags',t+'modified'];this.stats=['_user_tags'];if(!this.doclistview.can_delete){this.columns=$.map(this.columns,function(v,i){if(v.content!='check')return v});}},columns:[{width:'3%',content:'check'},{width:'4%',content:'avatar'},{width:'3%',content:'docstatus',css:{"text-align":"center"}},{width:'35%',content:'name'},{width:'40%',content:'tags',css:{'color':'#aaa'}},{width:'15%',content:'modified',css:{'text-align':'right','color':'#777'}}],render_column:function(data,parent,opts){var me=this;if(opts.css){$.each(opts.css,function(k,v){$(parent).css(k,v)});}
|
||||
if(opts.content.indexOf&&opts.content.indexOf('+')!=-1){$.map(opts.content.split('+'),function(v){me.render_column(data,parent,{content:v});});return;}
|
||||
if(typeof opts.content=='function'){opts.content(parent,data);}
|
||||
else if(opts.content=='name'){$(parent).html(repl('<a href="#!Form/%(doctype)s/%(name)s">%(name)s</a>',data));}
|
||||
else if(opts.content=='avatar'){$(parent).html(repl('<span class="avatar-small"><img src="%(avatar)s" \
|
||||
title="%(fullname)s"/></span>',data));}
|
||||
else if(opts.content=='check'){$(parent).html('<input class="list-delete" type="checkbox">');$(parent).find('input').data('name',data.name);}
|
||||
else if(opts.content=='docstatus'){$(parent).html(repl('<span class="docstatus"><i class="%(docstatus_icon)s" \
|
||||
title="%(docstatus_title)s"></i></span>',data));}
|
||||
else if(opts.content=='tags'){this.add_user_tags(parent,data);}
|
||||
else if(opts.content=='modified'){$(parent).append(data.when);}
|
||||
else if(opts.type=='bar-graph'){args={percent:data[opts.content],fully_delivered:(data[opts.content]>99?'bar-complete':''),label:opts.label}
|
||||
$(parent).html(repl('<span class="bar-outer" style="width: 30px; float: right" \
|
||||
title="%(percent)s% %(label)s">\
|
||||
<span class="bar-inner %(fully_delivered)s" \
|
||||
style="width: %(percent)s%;"></span>\
|
||||
</span>',args));}
|
||||
else if(data[opts.content]){$(parent).append(' '+data[opts.content]);}},render:function(row,data){var me=this;this.prepare_data(data);rowhtml='';$.each(this.columns,function(i,v){rowhtml+=repl('<td style="width: %(width)s"></td>',v);});var tr=$(row).html('<table><tbody><tr>'+rowhtml+'</tr></tbody></table>').find('tr').get(0);$.each(this.columns,function(i,v){me.render_column(data,tr.cells[i],v);});},prepare_data:function(data){data.fullname=wn.user_info(data.owner).fullname;data.avatar=wn.user_info(data.owner).image;data.when=dateutil.str_to_user(data.modified).split(' ')[0];var diff=dateutil.get_diff(dateutil.get_today(),data.modified.split(' ')[0]);if(diff==0){data.when='Today'}
|
||||
if(diff==1){data.when='Yesterday'}
|
||||
if(diff==2){data.when='2 days ago'}
|
||||
if(data.docstatus==0||data.docstatus==null){data.docstatus_icon='icon-pencil';data.docstatus_title='Editable';}else if(data.docstatus==1){data.docstatus_icon='icon-lock';data.docstatus_title='Submitted';}else if(data.docstatus==2){data.docstatus_icon='icon-remove';data.docstatus_title='Cancelled';}},add_user_tags:function(parent,data){var me=this;if(data._user_tags){$.each(data._user_tags.split(','),function(i,t){if(t){$('<span class="label label-info" style="cursor: pointer">'
|
||||
+strip(t)+'</span>').click(function(){me.doclistview.set_filter('_user_tags',$(this).text())}).appendTo(parent);}});}}})
|
||||
/*
|
||||
* lib/js/wn/views/pageview.js
|
||||
*/
|
||||
wn.provide('wn.views.pageview');wn.views.pageview={pages:{},with_page:function(name,callback){if(!locals.Page[name]){wn.call({method:'webnotes.widgets.page.getpage',args:{'name':name},callback:callback});}else{callback();}},show:function(name){wn.views.pageview.with_page(name,function(){if(!wn.pages[name]){wn.views.pageview.pages[name]=new wn.views.Page(name);}
|
||||
wn.container.change_to(name);});}}
|
||||
wn.views.Page=Class.extend({init:function(name){this.name=name;var me=this;this.pagedoc=locals.Page[this.name];this.wrapper=wn.container.add_page(this.name);this.wrapper.label=this.pagedoc.title||this.pagedoc.name;this.wrapper.innerHTML=this.pagedoc.content;wn.dom.eval(this.pagedoc.__script||this.pagedoc.script||'');wn.dom.set_style(this.pagedoc.style);this.trigger('onload');$(this.wrapper).bind('show',function(){cur_frm=null;me.trigger('onshow');});},trigger:function(eventname){var me=this;try{if(pscript[eventname+'_'+this.name]){pscript[eventname+'_'+this.name](me.wrapper);}else if(me.wrapper[eventname]){me.wrapper[eventname](me.wrapper);}}catch(e){console.log(e);}}})
|
||||
/*
|
||||
* lib/js/wn/views/formview.js
|
||||
*/
|
||||
wn.provide('wn.views.formview');wn.views.formview={show:function(dt,dn){if(wn.model.new_names[dn])
|
||||
dn=wn.model.new_names[dn];wn.model.with_doctype(dt,function(){wn.model.with_doc(dt,dn,function(dn){if(!wn.views.formview[dt]){wn.views.formview[dt]=wn.container.add_page('Form - '+dt);wn.views.formview[dt].frm=new _f.Frm(dt,wn.views.formview[dt]);}
|
||||
wn.container.change_to('Form - '+dt);wn.views.formview[dt].frm.refresh(dn);});})}}
|
||||
/*
|
||||
* lib/js/wn/views/reportview.js
|
||||
*/
|
||||
wn.views.reportview={show:function(dt,rep_name){wn.require('lib/js/legacy/report.compressed.js');dt=get_label_doctype(dt);if(!_r.rb_con){_r.rb_con=new _r.ReportContainer();}
|
||||
_r.rb_con.set_dt(dt,function(rb){if(rep_name){var t=rb.current_loaded;rb.load_criteria(rep_name);if(onload)
|
||||
onload(rb);if((rb.dt)&&(!rb.dt.has_data()||rb.current_loaded!=t))
|
||||
rb.dt.run();}
|
||||
if(!rb.forbidden){wn.container.change_to('Report Builder');}});}}
|
||||
/*
|
||||
* lib/js/wn/request.js
|
||||
*/
|
||||
wn.provide('wn.request');wn.request.url='index.cgi';wn.request.prepare=function(opts){if(opts.btn)$(opts.btn).set_working();if(opts.show_spinner)set_loading();if(opts.freeze)freeze();if(!opts.args.cmd){console.log(opts)
|
||||
throw"Incomplete Request";}}
|
||||
wn.request.cleanup=function(opts,r){if(opts.btn)$(opts.btn).done_working();if(opts.show_spinner)hide_loading();if(opts.freeze)unfreeze();if(wn.boot.sid&&wn.get_cookie('sid')!=wn.boot.sid){msgprint('Session expired');setTimeout('redirect_to_login()',3000);return;}
|
||||
if(r.server_messages)msgprint(r.server_messages)
|
||||
if(r.exc){errprint(r.exc);console.log(r.exc);};if(r.docs)LocalDB.sync(r.docs);}
|
||||
wn.request.call=function(opts){wn.request.prepare(opts);$.ajax({url:opts.url||wn.request.url,data:opts.args,type:opts.type||'POST',dataType:opts.dataType||'json',success:function(r,xhr){wn.request.cleanup(opts,r);opts.success(r,xhr.responseText);},error:function(xhr,textStatus){wn.request.cleanup(opts,{});msgprint('Unable to complete request: '+textStatus)
|
||||
if(opts.error)opts.error(xhr)}})}
|
||||
wn.call=function(opts){var args=$.extend({},opts.args)
|
||||
if(opts.module&&opts.page){args.cmd=opts.module+'.page.'+opts.page+'.'+opts.page+'.'+opts.method}else if(opts.method){args.cmd=opts.method;}
|
||||
for(key in args){if(args[key]&&typeof args[key]!='string'){args[key]=JSON.stringify(args[key]);}}
|
||||
wn.request.call({args:args,success:opts.callback,error:opts.error,btn:opts.btn,freeze:opts.freeze,show_spinner:!opts.no_spinner});}
|
||||
/*
|
||||
* lib/js/core.js
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -3,13 +3,9 @@
|
|||
// dialog container
|
||||
var popup_cont;
|
||||
var session = {};
|
||||
var start_sid = null;
|
||||
if(!wn) var wn = {};
|
||||
|
||||
function startup() {
|
||||
// save the sid (so that we know if it changes mid-session)
|
||||
start_sid = get_cookie('sid');
|
||||
|
||||
function startup() {
|
||||
popup_cont = $a(document.getElementsByTagName('body')[0], 'div');
|
||||
|
||||
// Globals
|
||||
|
|
@ -40,34 +36,44 @@ function startup() {
|
|||
wn.control_panel = r.control_panel;
|
||||
}
|
||||
|
||||
var setup_history = function(r) {
|
||||
rename_observers.push(nav_obj);
|
||||
var setup_viewport = function() {
|
||||
wn.container = new wn.views.Container();
|
||||
|
||||
// toolbar
|
||||
if(user=='Guest')
|
||||
user_defaults.hide_webnotes_toolbar = 1;
|
||||
if(!cint(user_defaults.hide_webnotes_toolbar) || user=='Administrator') {
|
||||
wn.container.wntoolbar = new wn.ui.toolbar.Toolbar();
|
||||
}
|
||||
|
||||
// startup code
|
||||
$(document).trigger('startup');
|
||||
try{
|
||||
if(wn.control_panel.custom_startup_code)
|
||||
eval(wn.control_panel.custom_startup_code);
|
||||
} catch(e) {
|
||||
errprint(e);
|
||||
}
|
||||
|
||||
// open an existing page or record
|
||||
var t = to_open();
|
||||
if(t) {
|
||||
window.location.hash = t;
|
||||
} else if(home_page) {
|
||||
loadpage(home_page);
|
||||
}
|
||||
wn.route();
|
||||
|
||||
$dh('startup_div');
|
||||
$ds('body_div');
|
||||
}
|
||||
|
||||
var callback = function(r,rt) {
|
||||
if(r.exc) console.log(r.exc);
|
||||
setup_globals(r);
|
||||
setup_history();
|
||||
|
||||
var a = new Body();
|
||||
page_body.run_startup_code();
|
||||
|
||||
for(var i=0; i<startup_list.length; i++) {
|
||||
startup_list[i]();
|
||||
}
|
||||
|
||||
// show a new form on loading?
|
||||
|
||||
// open an existing page or record
|
||||
var t = to_open();
|
||||
if(t) {
|
||||
historyChange(t);
|
||||
} else if(home_page) {
|
||||
// show home oage
|
||||
loadpage(home_page);
|
||||
}
|
||||
page_body.ready();
|
||||
setup_viewport();
|
||||
}
|
||||
|
||||
if(wn.boot) {
|
||||
LocalDB.sync(wn.boot.docs);
|
||||
callback(wn.boot, '');
|
||||
|
|
|
|||
|
|
@ -30,9 +30,7 @@ var user_fullname=null;
|
|||
var user_email=null;
|
||||
var user_img = {};
|
||||
var home_page=null;
|
||||
var hide_autosuggest=null;
|
||||
|
||||
var page_body=null;
|
||||
var pscript = {};
|
||||
var selector=null;
|
||||
|
||||
|
|
@ -61,5 +59,4 @@ var cur_frm=null;
|
|||
var pscript = {};
|
||||
var validated = true;
|
||||
var validation_message = '';
|
||||
var tinymce_loaded = null;
|
||||
var cur_autosug = null;
|
||||
var tinymce_loaded = null;
|
||||
69
js/legacy/jquery/jquery-ui.min.js
vendored
|
|
@ -28,7 +28,7 @@ function compress_doclist(list) {
|
|||
if(!kl[o.doctype]) { // make key only once # doctype must be first
|
||||
var tfl = ['doctype', 'name', 'docstatus', 'owner', 'parent', 'parentfield', 'parenttype', 'idx', 'creation', 'modified', 'modified_by', '__islocal', '__deleted','__newname', '__modified', '_user_tags']; // for text
|
||||
var fl = ['doctype', 'name', 'docstatus', 'owner', 'parent', 'parentfield', 'parenttype', 'idx', 'creation', 'modified', 'modified_by', '__islocal', '__deleted','__newname', '__modified', '_user_tags']; // for unique
|
||||
|
||||
|
||||
for(key in fields[o.doctype]) { // all other values
|
||||
if(!in_list(fl, key)
|
||||
&& !in_list(no_value_fields, fields[o.doctype][key].fieldtype)
|
||||
|
|
@ -86,13 +86,8 @@ function save_doclist(dt, dn, save_action, onsave, onerr) {
|
|||
}
|
||||
}
|
||||
|
||||
var f = frms[dt];
|
||||
if(f && !all_clear) { // has errors
|
||||
if(f)f.savingflag = false;
|
||||
return 'Error';
|
||||
}
|
||||
|
||||
var _save = function() {
|
||||
//console.log(compress_doclist(doclist));
|
||||
$c('webnotes.widgets.form.save.savedocs', {'docs':compress_doclist(doclist), 'docname':dn, 'action': save_action, 'user':user },
|
||||
function(r, rtxt) {
|
||||
if(f){ f.savingflag = false;}
|
||||
|
|
|
|||
|
|
@ -107,8 +107,11 @@ LocalDB.sync = function(list) {
|
|||
fields[d.parent][d.label] = d;
|
||||
}
|
||||
}
|
||||
if(d.localname)
|
||||
notify_rename_observers(d.doctype, d.localname, d.name);
|
||||
if(d.localname) {
|
||||
wn.model.new_names[d.localname] = d.name;
|
||||
$(document).trigger('rename', [d.doctype, d.localname, d.name]);
|
||||
delete locals[d.doctype][d.localname];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -145,17 +148,6 @@ LocalDB.set_default_values = function(doc) {
|
|||
}
|
||||
return fields_to_refresh;
|
||||
}
|
||||
// ======================================================================================
|
||||
|
||||
LocalDB.is_doc_loaded = function(dt, dn) {
|
||||
var exists = false;
|
||||
if(locals[dt] && locals[dt][dn]) exists = true;
|
||||
if(exists && dt=='DocType' // if it is a doctype
|
||||
&& !locals[dt][dn].__islocal // and not copied
|
||||
&& !frms[dt]) // and not loaded
|
||||
exists = false; // reload
|
||||
return exists;
|
||||
}
|
||||
|
||||
// ======================================================================================
|
||||
|
||||
|
|
@ -315,25 +307,6 @@ function make_doclist(dt, dn, deleted) {
|
|||
return dl;
|
||||
}
|
||||
|
||||
// Renaming notification list
|
||||
// ======================================================================================
|
||||
|
||||
var rename_observers = [];
|
||||
function notify_rename_observers(dt, old_name, new_name) {
|
||||
// delete from local
|
||||
try {
|
||||
delete locals[dt][old_name];
|
||||
} catch(e) {
|
||||
alert("[rename_from_local] No Document for: "+ old_name);
|
||||
}
|
||||
|
||||
// everyone who observers
|
||||
for(var i=0; i<rename_observers.length;i++) {
|
||||
if(rename_observers[i])
|
||||
rename_observers[i].rename_notify(dt, old_name, new_name);
|
||||
}
|
||||
}
|
||||
|
||||
// Meta Data
|
||||
// ======================================================================================
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* lib/js/legacy/widgets/report_builder/report_builder.js
|
||||
*/
|
||||
_r.ReportContainer=function(){if(user=='Guest'){msgprint("Not Allowed");return;}
|
||||
this.wrapper=page_body.add_page("Report Builder",function(){});this.wrapper.className='layout_wrapper';var head_div=$a(this.wrapper,'div');this.rb_area=$a(this.wrapper,'div');$dh(this.wrapper);var me=this;this.rb_dict={};this.page_head=new PageHeader(head_div);$y(this.page_head.wrapper,{marginBottom:'0px'});var run_fn=function(){if(me.cur_rb){me.cur_rb.dt.start_rec=1;me.cur_rb.dt.run();}}
|
||||
this.wrapper=$a(wn.container.add_page("Report Builder"),'div','layout-wrapper');var head_div=$a(this.wrapper,'div');this.rb_area=$a(this.wrapper,'div');var me=this;this.rb_dict={};this.page_head=new PageHeader(head_div);$y(this.page_head.wrapper,{marginBottom:'0px'});var run_fn=function(){if(me.cur_rb){me.cur_rb.dt.start_rec=1;me.cur_rb.dt.run();}}
|
||||
var runbtn=this.page_head.add_button('Run',run_fn,1,'ui-icon-circle-triangle-e',1);if(has_common(['Administrator','System Manager'],user_roles)){var savebtn=this.page_head.add_button('Save',function(){if(me.cur_rb)me.cur_rb.save_criteria();},0,'ui-icon-disk');var fn=function(){if(me.cur_rb){if(!me.cur_rb.current_loaded){msgprint("error:You must save the report before you can set Advanced features");return;}
|
||||
loaddoc('Search Criteria',me.cur_rb.sc_dict[me.cur_rb.current_loaded]);}};var advancedbtn=this.page_head.add_button('Advanced Settings',fn);}
|
||||
this.set_dt=function(dt,onload){my_onload=function(f){if(!f.forbidden){me.cur_rb=f;me.cur_rb.mytabs.items['Result'].expand();if(onload)onload(f);}}
|
||||
|
|
@ -60,7 +60,7 @@ me.set_sort_options();}
|
|||
_r.ReportBuilder.prototype.set_sort_options=function(l){var sl=this.orig_sort_list;empty_select(this.dt.sort_sel);if(l)sl=add_lists(l,this.orig_sort_list);if(!l)l=[];if(!l.length){l.push(['ID','name'])}
|
||||
for(var i=0;i<sl.length;i++){this.dt.add_sort_option(sl[i][0],sl[i][1]);}}
|
||||
_r.ReportBuilder.prototype.validate_permissions=function(onload){this.perm=get_perm(this.parent_dt?this.parent_dt:this.doctype);if(!this.perm[0][READ]){this.forbidden=1;if(user=='Guest'){msgprint('You must log in to view this page');}else{msgprint('No Read Permission');}
|
||||
nav_obj.show_last_open();return 0;}
|
||||
window.back();return 0;}
|
||||
return 1;}
|
||||
_r.ReportBuilder.prototype.setup_doctype=function(onload){var me=this;if(!locals['DocType'][this.doctype]){this.load_doctype_from_server(onload);}else{for(var key in locals.DocField){var f=locals.DocField[key];if(f.fieldtype=='Table'&&f.options==this.doctype)
|
||||
this.parent_dt=f.parent;}
|
||||
|
|
|
|||
|
|
@ -1,3 +0,0 @@
|
|||
// home
|
||||
|
||||
//login_file = 'index.html'
|
||||
|
|
@ -20,8 +20,6 @@
|
|||
// OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
var startup_list = [];
|
||||
|
||||
wn.utils.full_name = function(fn, ln) { return fn + (ln ? ' ' : '') + (ln ? ln : '') }
|
||||
|
||||
|
||||
|
|
@ -168,7 +166,7 @@ function flt(v,decimals) {
|
|||
if(isNaN(v))
|
||||
v=0;
|
||||
if(decimals!=null)
|
||||
return v.toFixed(decimals);
|
||||
return parseFloat(v.toFixed(decimals));
|
||||
return v;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -65,6 +65,8 @@ wn.datetime = {
|
|||
},
|
||||
|
||||
get_diff: function(d1, d2) {
|
||||
if(typeof d1=='string') d1 = dateutil.str_to_obj(d1);
|
||||
if(typeof d2=='string') d2 = dateutil.str_to_obj(d2);
|
||||
return ((d1-d2) / 86400000);
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ wn.tinymce = {
|
|||
ele.myid = wn.dom.set_unique_id(ele);
|
||||
$(ele).tinymce({
|
||||
// Location of TinyMCE script
|
||||
script_url : 'lib/js/legacy/tiny_mce_33/tiny_mce.js',
|
||||
script_url : 'lib/js/lib/tiny_mce_33/tiny_mce.js',
|
||||
|
||||
height: height ? height : '200px',
|
||||
|
||||
|
|
@ -94,8 +94,7 @@ function $ln(parent, label, onclick, style) {
|
|||
}
|
||||
|
||||
function $btn(parent, label, onclick, style, css_class, is_ajax) {
|
||||
wn.require('lib/js/wn/ui/button.js');
|
||||
if(css_class==='green') css_class='btn-primary';
|
||||
if(css_class==='green') css_class='btn-info';
|
||||
return new wn.ui.Button(
|
||||
{parent:parent, label:label, onclick:onclick, style:style, is_ajax: is_ajax, css_class: css_class}
|
||||
).btn;
|
||||
|
|
@ -171,6 +170,20 @@ $bs = function(ele, r) { $(ele).css('-moz-box-shadow',r).css('-webkit-box-shadow
|
|||
// Select
|
||||
// ====================================
|
||||
|
||||
function SelectWidget(parent, options, width, editable, bg_color) {
|
||||
var me = this;
|
||||
// native select
|
||||
this.inp = $a(parent, 'select');
|
||||
if(options) add_sel_options(this.inp, options);
|
||||
if(width) $y(this.inp, {width:width});
|
||||
this.set_width = function(w) { $y(this.inp, {width:w}) };
|
||||
this.set_options = function(o) { add_sel_options(this.inp, o); }
|
||||
this.inp.onchange = function() {
|
||||
if(me.onchange)me.onchange(this);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
function empty_select(s) {
|
||||
if(s.custom_select) { s.empty(); return; }
|
||||
if(s.inp)s = s.inp;
|
||||
|
|
@ -272,12 +285,9 @@ function $i(id) {
|
|||
if(id && id.appendChild)return id; // already an element
|
||||
return document.getElementById(id);
|
||||
}
|
||||
function $t(parent, txt) { if(parent.substr)parent = $i(parent); return parent.appendChild(document.createTextNode(txt)); }
|
||||
function $w(e,w) { if(e && e.style && w)e.style.width = w; }
|
||||
function $h(e,h) { if(e && e.style && h)e.style.height = h; }
|
||||
function $bg(e,w) { if(e && e.style && w)e.style.backgroundColor = w; }
|
||||
function $fg(e,w) { if(e && e.style && w)e.style.color = w; }
|
||||
function $op(e,w) { if(e && e.style && w) { set_opacity(e,w); } }
|
||||
|
||||
function $y(ele, s) {
|
||||
if(ele && s) {
|
||||
|
|
@ -310,14 +320,7 @@ function $yt(tab, r, c, s) { /// set style on tables with wildcards
|
|||
// add css classes etc
|
||||
|
||||
function set_style(txt) {
|
||||
var se = document.createElement('style');
|
||||
se.type = "text/css";
|
||||
if (se.styleSheet) {
|
||||
se.styleSheet.cssText = txt;
|
||||
} else {
|
||||
se.appendChild(document.createTextNode(txt));
|
||||
}
|
||||
document.getElementsByTagName('head')[0].appendChild(se);
|
||||
wn.dom.set_style(txt);
|
||||
}
|
||||
|
||||
// Make table
|
||||
|
|
@ -415,16 +418,6 @@ function get_scroll_top() {
|
|||
return st;
|
||||
}
|
||||
|
||||
|
||||
function get_cookie(c) {
|
||||
var t=""+document.cookie;
|
||||
var ind=t.indexOf(c);
|
||||
if (ind==-1 || c=="") return "";
|
||||
var ind1=t.indexOf(';',ind);
|
||||
if (ind1==-1) ind1=t.length;
|
||||
return unescape(t.substring(ind+c.length+1,ind1));
|
||||
}
|
||||
|
||||
// URL utilities
|
||||
|
||||
wn.urllib = {
|
||||
|
|
@ -475,54 +468,3 @@ wn.urllib = {
|
|||
|
||||
get_url_arg = wn.urllib.get_arg;
|
||||
get_url_dict = wn.urllib.get_dict;
|
||||
|
||||
// set user image
|
||||
var user_img = {}
|
||||
var user_img_queue = {};
|
||||
var user_img_loading = [];
|
||||
|
||||
set_user_img = function(img, username, get_latest, img_id) {
|
||||
function set_it(i) {
|
||||
if(user_img[username]=='no_img_m')
|
||||
i.src = 'lib/images/ui/no_img_m.gif';
|
||||
else if(user_img[username]=='no_img_f')
|
||||
i.src = 'lib/images/ui/no_img_f.gif'; // no image
|
||||
else {
|
||||
ac_id = wn.control_panel.account_id;
|
||||
i.src = repl('cgi-bin/getfile.cgi?ac=%(ac)s&name=%(fn)s', {fn:user_img[username], ac:ac_id});
|
||||
}
|
||||
}
|
||||
|
||||
// given
|
||||
if(img_id) {
|
||||
user_img[username] = img_id;
|
||||
set_it(img);
|
||||
return;
|
||||
}
|
||||
|
||||
// from dict or load
|
||||
if(user_img[username] && !get_latest) {
|
||||
set_it(img);
|
||||
} else{
|
||||
// queue multiple request while loading
|
||||
if(in_list(user_img_loading,username)) {
|
||||
if(!user_img_queue[username])
|
||||
user_img_queue[username] = [];
|
||||
user_img_queue[username].push(img);
|
||||
return;
|
||||
}
|
||||
$c('webnotes.profile.get_user_img',{username:username},function(r,rt) {
|
||||
delete user_img_loading[user_img_loading.indexOf(username)];
|
||||
user_img[username] = r.message;
|
||||
|
||||
if(user_img_queue[username]) {
|
||||
var q=user_img_queue[username];
|
||||
for(var i in q) { set_it(q[i]); }
|
||||
}
|
||||
set_it(img);
|
||||
|
||||
}, null, 1);
|
||||
user_img_loading.push(username);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,146 +20,57 @@
|
|||
// OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
// My HTTP Request
|
||||
|
||||
var outUrl = "index.cgi";
|
||||
var NULL_CHAR = '^\5*';
|
||||
|
||||
// check response of HTTP request, only if ready
|
||||
function checkResponse(r, on_timeout, no_spinner, freeze_msg) {
|
||||
try {
|
||||
if (r.readyState==4 && r.status==200) return true; else return false;
|
||||
} catch(e) {
|
||||
// $i("icon_loading").style.visibility = "hidden"; WAINING MESSAGE
|
||||
msgprint("error:Request timed out, try again");
|
||||
if(on_timeout)
|
||||
on_timeout();
|
||||
|
||||
hide_loading();
|
||||
|
||||
if(freeze_msg)
|
||||
unfreeze();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
var pending_req = 0;
|
||||
|
||||
// new XMLHttpRequest object
|
||||
function newHttpReq() {
|
||||
if (!$.browser.msie)
|
||||
var r=new XMLHttpRequest();
|
||||
else if (window.ActiveXObject)
|
||||
var r=new ActiveXObject("Microsoft.XMLHTTP");
|
||||
return r;
|
||||
}
|
||||
|
||||
// call execute serverside request
|
||||
function $c(command, args, fn, on_timeout, no_spinner, freeze_msg, btn) {
|
||||
var req=newHttpReq();
|
||||
ret_fn=function() {
|
||||
if (checkResponse(req, on_timeout, no_spinner, freeze_msg)) {
|
||||
if(btn)$(btn).done_working();
|
||||
if(!no_spinner)
|
||||
hide_loading(); // Loaded
|
||||
|
||||
var rtxt = req.responseText;
|
||||
|
||||
try {
|
||||
var r = JSON.parse(rtxt);
|
||||
} catch(e) {
|
||||
msgprint('Handler Exception:' + rtxt);
|
||||
return;
|
||||
}
|
||||
// unfreeze
|
||||
if(freeze_msg)unfreeze();
|
||||
|
||||
if(!validate_session(r,rtxt)) return;
|
||||
if(r.exc) {
|
||||
errprint(r.exc);
|
||||
console.log(r.exc);
|
||||
};
|
||||
if(r.server_messages) { msgprint(r.server_messages);};
|
||||
if(r.docs) { LocalDB.sync(r.docs); }
|
||||
saveAllowed = true;
|
||||
if(fn)fn(r, rtxt);
|
||||
}
|
||||
}
|
||||
if(btn) $(btn).set_working();
|
||||
req.onreadystatechange=ret_fn;
|
||||
req.open("POST",outUrl,true);
|
||||
req.setRequestHeader("ENCTYPE", "multipart/form-data");
|
||||
req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
|
||||
args['cmd']=command;
|
||||
req.send(makeArgString(args));
|
||||
if(!no_spinner)set_loading(); // Loading
|
||||
if(freeze_msg)freeze(freeze_msg,1);
|
||||
}
|
||||
|
||||
function validate_session(r,rt) {
|
||||
// check for midway change in session
|
||||
if(r.message=='Logged In') {
|
||||
start_sid = get_cookie('sid');
|
||||
return true;
|
||||
}
|
||||
if(start_sid && start_sid != get_cookie('sid') && user && user!='Guest') {
|
||||
page_body.set_session_changed();
|
||||
return;
|
||||
}
|
||||
|
||||
// check for expired session
|
||||
if(r.exc && r.session_status=='Session Expired') {
|
||||
resume_session();
|
||||
return;
|
||||
}
|
||||
|
||||
// check for logged out sesion
|
||||
if(r.exc && r.session_status=='Logged Out') {
|
||||
msgprint('You have been logged out');
|
||||
setTimeout('redirect_to_login()', 3000);
|
||||
return;
|
||||
}
|
||||
|
||||
if(r.exc && r.exc_type && r.exc_type=='PermissionError') {
|
||||
loadpage('_home');
|
||||
}
|
||||
|
||||
return true;
|
||||
function $c(command, args, callback, error, no_spinner, freeze_msg, btn) {
|
||||
wn.request.call({
|
||||
args: $.extend(args, {cmd: command}),
|
||||
success: callback,
|
||||
error: error,
|
||||
btn: btn,
|
||||
freeze: freeze_msg,
|
||||
show_spinner: !no_spinner
|
||||
})
|
||||
}
|
||||
|
||||
// For calling an object
|
||||
function $c_obj(doclist, method, arg, call_back, no_spinner, freeze_msg, btn) {
|
||||
var args = { 'method':method, 'arg': (typeof arg=='string' ? arg : JSON.stringify(arg)) }
|
||||
function $c_obj(doclist, method, arg, callback, no_spinner, freeze_msg, btn) {
|
||||
if(arg && typeof arg!='string') arg = JSON.stringify(arg);
|
||||
|
||||
if(typeof doclist=='string') args.doctype = doclist;
|
||||
else args.docs = compress_doclist(doclist)
|
||||
|
||||
// single
|
||||
$c('runserverobj',args, call_back, null, no_spinner, freeze_msg, btn);
|
||||
args = {
|
||||
cmd:'runserverobj',
|
||||
arg: arg,
|
||||
method: method
|
||||
};
|
||||
|
||||
if(typeof doclist=='string')
|
||||
args.doctype = doclist;
|
||||
else
|
||||
args.docs = compress_doclist(doclist)
|
||||
|
||||
wn.request.call({
|
||||
args: args,
|
||||
success: callback,
|
||||
btn: btn,
|
||||
freeze: freeze_msg,
|
||||
show_spinner: !no_spinner
|
||||
});
|
||||
}
|
||||
|
||||
// For call a page metho
|
||||
function $c_page(module, page, method, arg, call_back, no_spinner, freeze_msg, btn) {
|
||||
if(arg && !arg.substr) arg = JSON.stringify(arg);
|
||||
$c(module+'.page.'+page+'.'+page+'.'+method,{'arg':arg},
|
||||
call_back, null, no_spinner, freeze_msg, btn);
|
||||
function $c_page(module, page, method, arg, callback, no_spinner, freeze_msg, btn) {
|
||||
if(arg && typeof arg!='string') arg = JSON.stringify(arg);
|
||||
wn.request.call({
|
||||
args: {
|
||||
cmd: module+'.page.'+page+'.'+page+'.'+method,
|
||||
arg: arg,
|
||||
method: method
|
||||
},
|
||||
success: callback,
|
||||
btn: btn,
|
||||
freeze: freeze_msg,
|
||||
show_spinner: !no_spinner
|
||||
});
|
||||
}
|
||||
|
||||
// generic server call (call page, object)
|
||||
wn.call = function(args) {
|
||||
if(!args.args) args.args = {};
|
||||
if(args.module && args.page) {
|
||||
$c_page(args.module, args.page, args.method, args.args, args.callback,
|
||||
args.no_spinner, false, args.btn);
|
||||
} else if(args.docs) {
|
||||
$c_obj(args.doc, args.method, args.args, args.callback, args.no_spinner,
|
||||
false, args.btn);
|
||||
} else {
|
||||
$c(args.method, args.args, args.callback, false, args.no_spinner, false, args.btn);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// For calling an for output as csv
|
||||
function $c_obj_csv(doclist, method, arg) {
|
||||
// single
|
||||
|
|
@ -176,31 +87,7 @@ function $c_obj_csv(doclist, method, arg) {
|
|||
args.docs = compress_doclist(doclist);
|
||||
|
||||
// open
|
||||
open_url_post(outUrl, args);
|
||||
}
|
||||
|
||||
function my_eval(co) {
|
||||
var w = window;
|
||||
|
||||
// Evaluate script
|
||||
if (!w.execScript) {
|
||||
if (/Gecko/.test(navigator.userAgent)) {
|
||||
eval(co, w); // Firefox 3.0
|
||||
} else {
|
||||
eval.call(w, co);
|
||||
}
|
||||
} else {
|
||||
w.execScript(co); // IE
|
||||
}
|
||||
}
|
||||
|
||||
function makeArgString(dict) {
|
||||
var varList = [];
|
||||
|
||||
for(key in dict){
|
||||
varList[varList.length] = key + '=' + encodeURIComponent(dict[key]);
|
||||
}
|
||||
return varList.join('&');
|
||||
open_url_post(wn.request.url, args);
|
||||
}
|
||||
|
||||
// call a url as POST
|
||||
|
|
|
|||
|
|
@ -1,133 +0,0 @@
|
|||
// Copyright (c) 2012 Web Notes Technologies Pvt Ltd (http://erpnext.com)
|
||||
//
|
||||
// MIT License (MIT)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a
|
||||
// copy of this software and associated documentation files (the "Software"),
|
||||
// to deal in the Software without restriction, including without limitation
|
||||
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
// and/or sell copies of the Software, and to permit persons to whom the
|
||||
// Software is furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
||||
// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
||||
// CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
|
||||
// OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
/** Page Body
|
||||
|
||||
+ body
|
||||
+ body
|
||||
+ left_sidebar
|
||||
+ center
|
||||
+ right_sidebar
|
||||
+ dead session
|
||||
|
||||
**/
|
||||
|
||||
wn.provide('wn.pages');
|
||||
|
||||
function Body() {
|
||||
this.left_sidebar = null;
|
||||
this.right_sidebar = null;
|
||||
this.status_area = null;
|
||||
var me = this;
|
||||
page_body = this;
|
||||
|
||||
this.ready = function() {
|
||||
$dh('startup_div');
|
||||
$ds('body_div');
|
||||
}
|
||||
|
||||
this.setup_page_areas = function() {
|
||||
this.center = this.body;
|
||||
this.center.header = $a(this.center, 'div');
|
||||
this.center.body = $a(this.center, 'div');
|
||||
this.center.loading = $a(this.center, 'div', '', {margin:'200px 0px', fontSize:'14px', color:'#999', textAlign:'center'});
|
||||
this.center.loading.innerHTML = 'Loading...'
|
||||
|
||||
}
|
||||
|
||||
this.run_startup_code = function() {
|
||||
$(document).trigger('startup');
|
||||
// startup code
|
||||
try{
|
||||
if(this.cp.custom_startup_code)
|
||||
eval(this.cp.custom_startup_code);
|
||||
} catch(e) {
|
||||
errprint(e);
|
||||
}
|
||||
}
|
||||
|
||||
this.setup = function() {
|
||||
this.cp = wn.control_panel;
|
||||
|
||||
this.wrapper = $a($i('body_div'),'div');
|
||||
this.body = $a(this.wrapper, 'div');
|
||||
|
||||
this.setup_page_areas();
|
||||
|
||||
// core areas;
|
||||
if(user=='Guest') user_defaults.hide_webnotes_toolbar = 1;
|
||||
if(!cint(user_defaults.hide_webnotes_toolbar) || user=='Administrator') {
|
||||
this.wntoolbar = new wn.ui.toolbar.Toolbar();
|
||||
}
|
||||
|
||||
// page width
|
||||
if(this.cp.page_width)
|
||||
$y(this.wrapper,{width:cint(this.cp.page_width) + 'px'});
|
||||
|
||||
}
|
||||
|
||||
// Standard containers
|
||||
// - Forms
|
||||
// - Report Builder
|
||||
// - Item List
|
||||
// - [Pages by their names]
|
||||
|
||||
this.cur_page = null;
|
||||
this.add_page = function(label, onshow, onhide) {
|
||||
var c = $a(this.center.body, 'div');
|
||||
if(onshow)
|
||||
c.page_show = onshow;
|
||||
if(onhide)
|
||||
c.page_hide = onhide;
|
||||
wn.pages[label] = c;
|
||||
$dh(c);
|
||||
return c;
|
||||
}
|
||||
|
||||
this.change_to = function(label) {
|
||||
// hide existing
|
||||
$dh(this.center.loading);
|
||||
if(me.cur_page && wn.pages[label]!=me.cur_page) {
|
||||
if(me.cur_page.page_hide)
|
||||
me.cur_page.page_hide();
|
||||
$dh(me.cur_page);
|
||||
}
|
||||
// show
|
||||
me.cur_page = wn.pages[label];
|
||||
me.cur_page_label = label;
|
||||
$(me.cur_page).fadeIn();
|
||||
|
||||
// on show
|
||||
if(me.cur_page.page_show)
|
||||
me.cur_page.page_show(me.cur_page);
|
||||
}
|
||||
|
||||
this.set_session_changed = function() {
|
||||
if(this.session_message_set) return;
|
||||
var div = $a($i('body_div').parentNode,'div','',{textAlign: 'center', fontSize:'14px', margin:'150px auto'});
|
||||
$dh('body_div');
|
||||
div.innerHTML = 'This session has been changed. Please <span class="link_type" onclick="window.location.reload()">refresh</span> to continue';
|
||||
this.session_message_set = 1;
|
||||
}
|
||||
|
||||
this.setup();
|
||||
}
|
||||
|
|
@ -49,7 +49,7 @@ ItemBrowserPage = function() {
|
|||
this.dt_details = {};
|
||||
this.cur_list = null;
|
||||
|
||||
this.my_page = page_body.add_page('ItemBrowser');
|
||||
this.my_page = wn.container.add_page('ItemBrowser');
|
||||
this.wrapper = $a(this.my_page,'div');
|
||||
}
|
||||
|
||||
|
|
@ -72,7 +72,7 @@ ItemBrowserPage.prototype.show = function(dt, label, field_list) {
|
|||
me.cur_list = me.lists[dt];
|
||||
me.cur_list.show();
|
||||
|
||||
page_body.change_to('ItemBrowser');
|
||||
wn.container.change_to('ItemBrowser');
|
||||
}
|
||||
|
||||
// -------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ function errprint(t) {
|
|||
border-bottom: 1px solid #AAA; overflow: auto; width: 90%;">'+t+'</pre>');
|
||||
}
|
||||
|
||||
function setup_err_console() {
|
||||
$(document).bind('startup', function() {
|
||||
err_console = new Dialog(640, 480, 'Error Console')
|
||||
err_console.make_body([
|
||||
['HTML', 'Error List']
|
||||
|
|
@ -57,6 +57,4 @@ function setup_err_console() {
|
|||
err_console.rows['Error List'].innerHTML = '<div style="padding: 16px; height: 360px; width: 90%; overflow: auto;">'
|
||||
+ err_list.join('<div style="height: 10px; margin-bottom: 10px; border-bottom: 1px solid #AAA"></div>') + '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
startup_list.push(setup_err_console);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,48 +0,0 @@
|
|||
// Copyright (c) 2012 Web Notes Technologies Pvt Ltd (http://erpnext.com)
|
||||
//
|
||||
// MIT License (MIT)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a
|
||||
// copy of this software and associated documentation files (the "Software"),
|
||||
// to deal in the Software without restriction, including without limitation
|
||||
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
// and/or sell copies of the Software, and to permit persons to whom the
|
||||
// Software is furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
||||
// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
||||
// CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
|
||||
// OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
var fcount = 0;
|
||||
var frozen = 0;
|
||||
var dialog_message;
|
||||
var dialog_back;
|
||||
|
||||
function freeze(msg, do_freeze) {
|
||||
// blur
|
||||
if(!dialog_back) {
|
||||
dialog_back = $a($i('body_div'), 'div', 'dialog_back');
|
||||
$(dialog_back).css('opacity', 0.6);
|
||||
}
|
||||
$ds(dialog_back);
|
||||
|
||||
fcount++;
|
||||
frozen = 1;
|
||||
}
|
||||
function unfreeze() {
|
||||
if(dialog_message)
|
||||
$dh(dialog_message);
|
||||
if(!fcount)return; // anything open?
|
||||
fcount--;
|
||||
if(!fcount) {
|
||||
$dh(dialog_back);
|
||||
frozen = 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,199 +0,0 @@
|
|||
// Copyright (c) 2012 Web Notes Technologies Pvt Ltd (http://erpnext.com)
|
||||
//
|
||||
// MIT License (MIT)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a
|
||||
// copy of this software and associated documentation files (the "Software"),
|
||||
// to deal in the Software without restriction, including without limitation
|
||||
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
// and/or sell copies of the Software, and to permit persons to whom the
|
||||
// Software is furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
||||
// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
||||
// CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
|
||||
// OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
// Navigation Object
|
||||
|
||||
var nav_obj = {}
|
||||
|
||||
nav_obj.observers = [];
|
||||
nav_obj.add_observer = function(o) { nav_obj.observers.push(o); }
|
||||
|
||||
nav_obj.ol = [];
|
||||
|
||||
//
|
||||
// notify my history so that it gets added to the back button history
|
||||
//
|
||||
nav_obj.open_notify = function(t, dt, dn, no_history) {
|
||||
// last should not be this (refresh)
|
||||
if(nav_obj.ol.length) {
|
||||
var tmp = nav_obj.ol[nav_obj.ol.length-1];
|
||||
if(tmp && tmp[0]==t && tmp[1]==dt && tmp[2]==dn) return;
|
||||
}
|
||||
|
||||
if(!no_history) {
|
||||
|
||||
// remove from history (if exists so that we can put it back on top)
|
||||
var tmp = [];
|
||||
for(var i in nav_obj.ol)
|
||||
if(!(nav_obj.ol[i][0]==t && nav_obj.ol[i][1]==dt && nav_obj.ol[i][2]==dn)) tmp.push(nav_obj.ol[i]);
|
||||
nav_obj.ol = tmp;
|
||||
|
||||
// add to top
|
||||
nav_obj.ol.push([t, dt, dn])
|
||||
|
||||
// encode
|
||||
en_t = encodeURIComponent(t);
|
||||
en_dt = encodeURIComponent(dt);
|
||||
en_dn = dn ? encodeURIComponent(dn) : '';
|
||||
|
||||
if(en_t=='Page') {
|
||||
var id = en_dt + (dn ? ('/'+en_dn): '')
|
||||
} else {
|
||||
var id = en_t+'/'+ en_dt + (dn ? ('/'+en_dn): '')
|
||||
}
|
||||
|
||||
// option to add to analytics engine
|
||||
if(nav_obj.on_open)
|
||||
nav_obj.on_open(id);
|
||||
|
||||
// add to "back" history
|
||||
// replace state (to url)
|
||||
if(window.location.hash!='!' + id) {
|
||||
window.location.hash = '!' + id;
|
||||
}
|
||||
}
|
||||
|
||||
nav_obj.notify_observers(t, dt, dn);
|
||||
|
||||
if(wn.boot.analytics_code) {
|
||||
try {
|
||||
eval(wn.boot.analytics_code);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Notify observers
|
||||
// =========================================
|
||||
|
||||
nav_obj.notify_observers = function(t, dt, dn) {
|
||||
// notify observers (for menu?)
|
||||
for(var i=0; i<nav_obj.observers.length; i++) {
|
||||
var o = nav_obj.observers[i];
|
||||
if(o && o.notify) o.notify(t, dt, dn);
|
||||
}
|
||||
}
|
||||
|
||||
// Remame links (for save - name change)
|
||||
// =========================================
|
||||
|
||||
nav_obj.rename_notify = function(dt, oldn, newn) {
|
||||
for(var i=0;i<nav_obj.ol.length;i++) {
|
||||
var o = nav_obj.ol[i];
|
||||
if(o[1]==dt && o[2]==oldn) o[2]=newn;
|
||||
}
|
||||
}
|
||||
|
||||
nav_obj.show_last_open = function() {
|
||||
var l = nav_obj.ol[nav_obj.ol.length-2];
|
||||
delete nav_obj.ol[nav_obj.ol.length-1]; // delete current open
|
||||
|
||||
if(!l) loadpage('_home');
|
||||
else if(l[0]=='Page') {
|
||||
loadpage(l[1]);
|
||||
} else if(l[0]=='Report') {
|
||||
loadreport(l[1],l[2]);
|
||||
} else if(l[0]=='Form') {
|
||||
loaddoc(l[1],l[2]);
|
||||
} else if(l[0]=='DocBrowser' || l[0]=='List') {
|
||||
loaddocbrowser(l[1]);
|
||||
}
|
||||
}
|
||||
|
||||
var _history_current;
|
||||
|
||||
function history_get_name(t) {
|
||||
var parts = [];
|
||||
if(t.length>=3) {
|
||||
// combine all else
|
||||
for(var i=2; i<t.length; i++) {
|
||||
parts.push(t[i]);
|
||||
}
|
||||
}
|
||||
return parts.join('/')
|
||||
}
|
||||
|
||||
//
|
||||
// get the page details from the location
|
||||
//
|
||||
nav_obj.get_page = function(loc) {
|
||||
if(!loc) loc = window.location.hash;
|
||||
|
||||
// remove exclamation for hash-bangs
|
||||
if(loc.substr(0,1)=='#') { loc = loc.substr(1); }
|
||||
if(loc.substr(0,1)=='!') { loc = loc.substr(1); }
|
||||
|
||||
if(!in_list(['Page/', 'Form/', 'Repor', 'DocBr', 'List/'], loc.substr(0,5))) {
|
||||
loc = 'Page/' + loc;
|
||||
}
|
||||
return loc.split('/');
|
||||
}
|
||||
//
|
||||
// function called when page is updated
|
||||
//
|
||||
function historyChange(newLocation) {
|
||||
var t = nav_obj.get_page(newLocation)
|
||||
|
||||
for(var i=0;i<t.length;i++)
|
||||
t[i] = decodeURIComponent(t[i]);
|
||||
|
||||
// re-opening the same page?
|
||||
if(nav_obj.ol.length) {
|
||||
var c = nav_obj.ol[nav_obj.ol.length-1];
|
||||
|
||||
if(t.length==2) {
|
||||
if(c[0]==t[0] && c[1]==t[1]) return;
|
||||
} else {
|
||||
if(c[0]==t[0] && c[1]==t[1] && c[2]==t[2]) return;
|
||||
}
|
||||
}
|
||||
|
||||
if(t[2])
|
||||
var docname = history_get_name(t);
|
||||
|
||||
if(t[0]=='Form') {
|
||||
_history_current = newLocation;
|
||||
if(docname.substr(0, 3)=='New' && !(locals[t[1]] && locals[t[1]][docname])) {
|
||||
newdoc(t[1]);
|
||||
} else {
|
||||
loaddoc(t[1], docname);
|
||||
}
|
||||
} else if(t[0]=='Report') {
|
||||
_history_current = newLocation;
|
||||
loadreport(t[1], docname);
|
||||
} else if(t[0]=='Page') {
|
||||
_history_current = newLocation;
|
||||
loadpage(t[1]);
|
||||
} else if(t[0]=='Application') {
|
||||
_history_current = newLocation;
|
||||
loadapp(t[1]);
|
||||
} else if(t[0]=='DocBrowser' || t[0]=='List') {
|
||||
_history_current = newLocation;
|
||||
loaddocbrowser(t[1]);
|
||||
}
|
||||
};
|
||||
|
||||
$(window).bind('hashchange', function() {
|
||||
historyChange(location.hash);
|
||||
});
|
||||
|
|
@ -20,284 +20,43 @@
|
|||
// OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
// Load Report
|
||||
// -------------------------------------------------------------------------------
|
||||
function loadreport(dt, rep_name, onload) {
|
||||
if(rep_name)
|
||||
wn.set_route('Report', dt, rep_name);
|
||||
else
|
||||
wn.set_route('Report', dt);
|
||||
}
|
||||
|
||||
function loadreport(dt, rep_name, onload, menuitem, reset_report) {
|
||||
wn.require('lib/js/legacy/report.compressed.js');
|
||||
dt = get_label_doctype(dt);
|
||||
|
||||
var show_report_builder = function() {
|
||||
if(!_r.rb_con) {
|
||||
// first load
|
||||
_r.rb_con = new _r.ReportContainer();
|
||||
function loaddoc(doctype, name, onload) {
|
||||
doctype = get_label_doctype(doctype);
|
||||
wn.model.with_doctype(doctype, function() {
|
||||
if(locals.DocType[doctype].in_dialog) {
|
||||
console.log(1)
|
||||
_f.edit_record(doctype, name);
|
||||
} else {
|
||||
wn.set_route('Form', doctype, name);
|
||||
}
|
||||
|
||||
_r.rb_con.set_dt(dt, function(rb) {
|
||||
if(rep_name) {
|
||||
var t = rb.current_loaded;
|
||||
rb.load_criteria(rep_name);
|
||||
|
||||
// call onload
|
||||
if(onload)
|
||||
onload(rb);
|
||||
|
||||
// if loaded, then run
|
||||
if((rb.dt) && (!rb.dt.has_data() || rb.current_loaded!=t))
|
||||
rb.dt.run();
|
||||
|
||||
} else {
|
||||
// reset if from toolbar
|
||||
if(reset_report) {
|
||||
rb.reset_report();
|
||||
}
|
||||
}
|
||||
|
||||
// show
|
||||
if(!rb.forbidden) {
|
||||
page_body.change_to('Report Builder');
|
||||
nav_obj.open_notify('Report',dt,rep_name);
|
||||
}
|
||||
} );
|
||||
}
|
||||
show_report_builder();
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// Load Doc
|
||||
// -------------------------------------------------------------------------------
|
||||
|
||||
var load_doc = loaddoc;
|
||||
|
||||
function loaddoc(doctype, name, onload, menuitem, from_archive) {
|
||||
doctype = get_label_doctype(doctype);
|
||||
|
||||
// validate
|
||||
if(frms['DocType'] && frms['DocType'].opendocs[doctype]) {
|
||||
msgprint("Cannot open an instance of \"" + doctype + "\" when the DocType is open.");
|
||||
return;
|
||||
}
|
||||
|
||||
// reverse validation - do not open DocType when an instance is open
|
||||
if(doctype=='DocType' && frms[name]) {
|
||||
msgprint("Cannot open DocType \"" + name + "\" when its instance is open.");
|
||||
return;
|
||||
}
|
||||
|
||||
var show_form = function(f) {
|
||||
// load the frm container
|
||||
if(!_f.frm_con) {
|
||||
_f.frm_con = new _f.FrmContainer(); //new _f.FrmContainer();
|
||||
}
|
||||
|
||||
// case A - frm not loaded
|
||||
if(!frms[doctype]) {
|
||||
_f.add_frm(doctype, show_doc, name, from_archive);
|
||||
|
||||
// case B - both loaded
|
||||
} else if(LocalDB.is_doc_loaded(doctype, name)) {
|
||||
show_doc();
|
||||
|
||||
// case C - only frm loaded
|
||||
} else {
|
||||
$c('webnotes.widgets.form.load.getdoc', {'name':name, 'doctype':doctype, 'user':user, 'from_archive':(from_archive ? 1 : 0) }, show_doc, null, null); // onload
|
||||
}
|
||||
}
|
||||
|
||||
var show_doc = function(r,rt) {
|
||||
if(locals[doctype] && locals[doctype][name]) {
|
||||
var frm = frms[doctype];
|
||||
|
||||
// show
|
||||
frm.refresh(name);
|
||||
|
||||
// notify for back button
|
||||
if(!frm.in_dialog)
|
||||
nav_obj.open_notify('Form',doctype,name);
|
||||
|
||||
if(onload) onload();
|
||||
|
||||
} else {
|
||||
// nothing, go home - there were errors
|
||||
if(r.exc) { msgprint('There were errors while loading ' + doctype + ' ' + name); }
|
||||
loadpage('_home');
|
||||
}
|
||||
}
|
||||
|
||||
//// is libary loaded?
|
||||
|
||||
show_form();
|
||||
}
|
||||
|
||||
|
||||
// New Doc
|
||||
// -------------------------------------------------------------------------------
|
||||
|
||||
function new_doc(doctype, onload, in_dialog, on_save_callback, cdt, cdn, cnic) {
|
||||
// cnic = caller not in container (caller is a dialog)
|
||||
|
||||
doctype = get_label_doctype(doctype);
|
||||
|
||||
if(!doctype) {
|
||||
if(cur_frm)doctype = cur_frm.doctype; else return;
|
||||
}
|
||||
|
||||
var show_doc = function() {
|
||||
frm = frms[doctype];
|
||||
|
||||
if (frm.perm[0][CREATE]==1) {
|
||||
|
||||
// load new doc - create the new doc (if single, just load it)
|
||||
if(frm.meta.issingle) {
|
||||
var dn = doctype;
|
||||
LocalDB.set_default_values(locals[doctype][doctype]);
|
||||
} else
|
||||
var dn = LocalDB.create(doctype);
|
||||
|
||||
// call (optional) onload
|
||||
if(onload)onload(dn);
|
||||
|
||||
|
||||
if(frm.in_dialog) {
|
||||
// attach values so that the "new" value is set in the field from which it was set
|
||||
var fd = _f.frm_dialog;
|
||||
fd.cdt = cdt;
|
||||
fd.cdn = cdn;
|
||||
fd.cnic = cnic;
|
||||
fd.on_save_callback = on_save_callback;
|
||||
} else {
|
||||
nav_obj.open_notify('Form',doctype,dn);
|
||||
}
|
||||
|
||||
// show the form
|
||||
frm.refresh(dn);
|
||||
|
||||
wn.model.with_doctype(doctype, function() {
|
||||
if(locals.DocType[doctype].in_dialog) {
|
||||
_f.edit_record(doctype, 'New ' + doctype);
|
||||
} else {
|
||||
msgprint('error:Not Allowed To Create '+doctype+'\nContact your Admin for help');
|
||||
wn.set_route('Form', doctype, 'New ' + doctype);
|
||||
}
|
||||
}
|
||||
|
||||
var show_form = function() {
|
||||
// load the frm container
|
||||
if(!_f.frm_con) {
|
||||
_f.frm_con = new _f.FrmContainer();
|
||||
}
|
||||
|
||||
if(!frms[doctype])
|
||||
_f.add_frm(doctype, show_doc); // load
|
||||
else
|
||||
show_doc(frms[doctype]); // directly
|
||||
|
||||
}
|
||||
|
||||
show_form();
|
||||
})
|
||||
}
|
||||
var newdoc = new_doc;
|
||||
|
||||
//
|
||||
// Load Page
|
||||
//
|
||||
var pscript={};
|
||||
var cur_page;
|
||||
function loadpage(page_name, call_back, no_history) {
|
||||
if(!page_name) return;
|
||||
if(page_name=='_home')
|
||||
page_name = home_page;
|
||||
var fn = function(r,rt) {
|
||||
if(wn.pages[page_name]) {
|
||||
// loaded
|
||||
var p = wn.pages[page_name]
|
||||
|
||||
// show
|
||||
page_body.change_to(page_name);
|
||||
|
||||
} else {
|
||||
// new page
|
||||
var p = render_page(page_name);
|
||||
if(!p)return;
|
||||
}
|
||||
|
||||
// execute callback
|
||||
cur_page = page_name;
|
||||
if(call_back)call_back();
|
||||
|
||||
// scroll to top
|
||||
scroll(0,0);
|
||||
|
||||
// update "back"
|
||||
pscript.update_page_history(page_name, no_history)
|
||||
|
||||
// call refresh script
|
||||
try {
|
||||
if(pscript['refresh_'+page_name]) pscript['refresh_'+page_name](); // onload
|
||||
} catch(e) {
|
||||
console.log(e);
|
||||
}
|
||||
}
|
||||
|
||||
if(get_local('Page', page_name) || wn.pages[page_name])
|
||||
fn();
|
||||
else {
|
||||
args = get_url_dict(); // send everything to the page
|
||||
args.name = page_name;
|
||||
$c('webnotes.widgets.page.getpage', args, fn);
|
||||
}
|
||||
wn.set_route(page_name);
|
||||
}
|
||||
|
||||
//
|
||||
// adds to the url (if called using loadpage and not the url)
|
||||
// - if i do not do this then it will overwrite
|
||||
// this is useful when an argument is passed to the page separated by a /
|
||||
//
|
||||
pscript.update_page_history = function(page_name, no_history) {
|
||||
var arg = null;
|
||||
var t = null;
|
||||
|
||||
// get from page
|
||||
if(window.location.hash) {
|
||||
var t = nav_obj.get_page(window.location.hash)
|
||||
} else if(get_url_arg('page')) {
|
||||
var t = nav_obj.get_page(get_url_arg('page'))
|
||||
}
|
||||
|
||||
if(t && t[1]==page_name) arg = t[2];
|
||||
|
||||
nav_obj.open_notify('Page', page_name, arg, no_history);
|
||||
}
|
||||
|
||||
//
|
||||
// Load Script
|
||||
//
|
||||
function loadscript(src, call_back) {
|
||||
set_loading();
|
||||
var script = $a('head','script');
|
||||
script.type = 'text/javascript';
|
||||
script.src = src;
|
||||
script.onload = function() {
|
||||
if(call_back)call_back(); hide_loading();
|
||||
}
|
||||
// IE 6 & 7
|
||||
script.onreadystatechange = function() {
|
||||
if (this.readyState == 'complete' || this.readyState == 'loaded') {
|
||||
hide_loading();
|
||||
call_back();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Load DocBrowser
|
||||
// -------------------------------------------------------------------------------
|
||||
|
||||
var doc_browser_page;
|
||||
function loaddocbrowser(dt, label, fields) {
|
||||
//wn.require('lib/js/wn/pages/doclistview.js');
|
||||
//wn.pages.doclistview.show(dt);
|
||||
//return;
|
||||
|
||||
wn.require('lib/js/legacy/webpage/docbrowser.js');
|
||||
dt = get_label_doctype(dt);
|
||||
if(!doc_browser_page)
|
||||
doc_browser_page = new ItemBrowserPage();
|
||||
doc_browser_page.show(dt, label, fields);
|
||||
nav_obj.open_notify('List',dt,'');
|
||||
}
|
||||
function loaddocbrowser(dt) {
|
||||
wn.set_route('List', dt);
|
||||
}
|
||||
|
|
@ -22,8 +22,6 @@
|
|||
|
||||
// PAGE
|
||||
|
||||
var stylesheets = [];
|
||||
|
||||
function Page(page_name, content) {
|
||||
var me = this;
|
||||
this.name = page_name;
|
||||
|
|
@ -54,7 +52,7 @@ function Page(page_name, content) {
|
|||
cur_frm = null;
|
||||
}
|
||||
|
||||
this.wrapper = page_body.add_page(page_name, this.page_show);
|
||||
this.wrapper = wn.container.add_page(page_name, this.page_show);
|
||||
this.cont = this.wrapper // bc
|
||||
|
||||
if(content)
|
||||
|
|
@ -76,12 +74,6 @@ function render_page(page_name, menuitem) {
|
|||
// style
|
||||
if(pdoc.style) set_style(pdoc.style)
|
||||
|
||||
// stylesheet
|
||||
if(pdoc.stylesheet) {
|
||||
set_style(locals.Stylesheet[pdoc.stylesheet].stylesheet);
|
||||
stylesheets.push(pdoc.stylesheet);
|
||||
}
|
||||
|
||||
// create page
|
||||
var p = new Page(page_name, pdoc._Page__content?pdoc._Page__content:pdoc.content);
|
||||
// script
|
||||
|
|
@ -93,7 +85,7 @@ function render_page(page_name, menuitem) {
|
|||
}
|
||||
|
||||
// change
|
||||
page_body.change_to(page_name);
|
||||
wn.container.change_to(page_name);
|
||||
|
||||
return p;
|
||||
}
|
||||
|
|
@ -102,6 +94,5 @@ function refresh_page(page_name) {
|
|||
var fn = function(r, rt) {
|
||||
render_page(page_name)
|
||||
}
|
||||
$c('webnotes.widgets.page.getpage', {'name':page_name,
|
||||
stylesheets:JSON.stringify(stylesheets)}, fn);
|
||||
$c('webnotes.widgets.page.getpage', {'name':page_name}, fn);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,8 +38,8 @@ var def_ph_style = {
|
|||
wrapper: {marginBottom:'16px', backgroundColor:'#EEE'}
|
||||
,main_heading: { }
|
||||
,sub_heading: { marginBottom:'8px', color:'#555', display:'none' }
|
||||
,separator: { borderTop:'3px solid #777' } // show this when there is no toolbar
|
||||
,toolbar_area: { padding:'3px 0px', display:'none',borderBottom:'1px solid #AAA'}
|
||||
,separator: { borderTop:'1px solid #ddd' } // show this when there is no toolbar
|
||||
,toolbar_area: { padding:'3px 0px', display:'none',borderBottom:'1px solid #ddd'}
|
||||
}
|
||||
|
||||
function PageHeader(parent, main_text, sub_text) {
|
||||
|
|
@ -59,7 +59,7 @@ function PageHeader(parent, main_text, sub_text) {
|
|||
// close btn
|
||||
$y($td(this.t1, 0, 1),{textAlign:'right', padding:'3px'});
|
||||
this.close_btn = $a($td(this.t1, 0, 1), 'span', 'close', {}, '×');
|
||||
this.close_btn.onclick = function() { nav_obj.show_last_open(); };
|
||||
this.close_btn.onclick = function() { window.history.back(); };
|
||||
|
||||
if(main_text) this.main_head.innerHTML = main_text;
|
||||
if(sub_text) this.sub_head.innerHTML = sub_text;
|
||||
|
|
@ -72,14 +72,22 @@ PageHeader.prototype.add_button = function(label, fn, bold, icon, green) {
|
|||
|
||||
var tb = this.toolbar_area;
|
||||
if(this.buttons[label]) return;
|
||||
|
||||
var btn = $btn(tb,label,fn,{marginRight:'4px'}, (green ? 'btn-primary' : ''));
|
||||
if(bold) $y(btn,{fontWeight:'bold'});
|
||||
|
||||
this.buttons[label]=btn;
|
||||
iconhtml = icon ? ('<i class="'+icon+'"></i> ') : '';
|
||||
|
||||
var $button = $('<button class="btn btn-small">'+ iconhtml + label +'</button>')
|
||||
.click(fn)
|
||||
.appendTo(tb);
|
||||
if(green) {
|
||||
$button.addClass('btn-info');
|
||||
$button.find('i').addClass('icon-white');
|
||||
}
|
||||
if(bold) $button.css('font-weight', 'bold');
|
||||
|
||||
this.buttons[label] = $button.get(0);
|
||||
$ds(this.toolbar_area);
|
||||
|
||||
return btn;
|
||||
return this.buttons[label];
|
||||
}
|
||||
|
||||
PageHeader.prototype.clear_toolbar = function() {
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ search_fields = {};
|
|||
|
||||
function setlinkvalue(name) {
|
||||
//selector.input.set(name);// in local - this will be set onchange
|
||||
selector.input.set_input(name); // on screen
|
||||
selector.input.set_input_value(name); // on screen
|
||||
selector.hide();
|
||||
}
|
||||
|
||||
|
|
@ -130,8 +130,8 @@ function makeselector() {
|
|||
}
|
||||
}
|
||||
d.onhide = function() {
|
||||
if(d.input && d.input.txt) // link, call onchange
|
||||
d.input.txt.onchange()
|
||||
//if(d.input && d.input.txt) // link, call onchange
|
||||
// d.input.txt.set_input_value()
|
||||
}
|
||||
|
||||
btn.onclick = function() {
|
||||
|
|
@ -191,10 +191,15 @@ function makeselector() {
|
|||
|
||||
var w = $a(d.rows['Result'],'div','',{height:'240px',overflow:'auto',margin:'4px'});
|
||||
for(var i=0; i<r.values.length; i++) {
|
||||
var div = $a(w,'div','',{marginBottom:'4px',paddingBottom:'4px',borderBottom:'1px dashed #CCC'});
|
||||
var div = $a(w,'div','',
|
||||
{marginBottom:'4px',paddingBottom:'4px',borderBottom:'1px dashed #CCC'});
|
||||
|
||||
// link
|
||||
var l = $a($a(div,'div'),'span','link_type'); l.innerHTML = r.values[i][0]; l.link_name = r.values[i][0]; l.dt = r.coloptions[0];
|
||||
var l = $a($a(div,'div'),'span','link_type');
|
||||
l.innerHTML = r.values[i][0];
|
||||
l.link_name = r.values[i][0];
|
||||
l.dt = r.coloptions[0];
|
||||
|
||||
if(d.input)
|
||||
l.onclick = function() { setlinkvalue(this.link_name); }
|
||||
else
|
||||
|
|
|
|||
|
|
@ -20,6 +20,10 @@
|
|||
// OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
var pending_req = 0;
|
||||
var fcount = 0;
|
||||
var dialog_back;
|
||||
|
||||
function set_loading() {
|
||||
pending_req++;
|
||||
$('#spinner').css('visibility', 'visible');
|
||||
|
|
@ -32,4 +36,21 @@ function hide_loading() {
|
|||
$('body').css('cursor', 'default');
|
||||
$('#spinner').css('visibility', 'hidden');
|
||||
}
|
||||
}
|
||||
|
||||
function freeze() {
|
||||
// blur
|
||||
if(!dialog_back) {
|
||||
dialog_back = $a($i('body_div'), 'div', 'dialog_back');
|
||||
$(dialog_back).css('opacity', 0.6);
|
||||
}
|
||||
$ds(dialog_back);
|
||||
fcount++;
|
||||
}
|
||||
function unfreeze() {
|
||||
if(!fcount)return; // anything open?
|
||||
fcount--;
|
||||
if(!fcount) {
|
||||
$dh(dialog_back);
|
||||
}
|
||||
}
|
||||
|
|
@ -38,7 +38,7 @@ Uploader = function(parent, args, callback) {
|
|||
|
||||
// upload form
|
||||
var div = $a(parent,'div');
|
||||
div.innerHTML = '<form method="POST" enctype="multipart/form-data" action="'+outUrl+'" target="'+id+'"></form>';
|
||||
div.innerHTML = '<form method="POST" enctype="multipart/form-data" action="'+wn.request.url+'" target="'+id+'"></form>';
|
||||
var ul_form = div.childNodes[0];
|
||||
|
||||
var f_list = [];
|
||||
|
|
|
|||
|
|
@ -1,577 +0,0 @@
|
|||
// Copyright (c) 2012 Web Notes Technologies Pvt Ltd (http://erpnext.com)
|
||||
//
|
||||
// MIT License (MIT)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a
|
||||
// copy of this software and associated documentation files (the "Software"),
|
||||
// to deal in the Software without restriction, including without limitation
|
||||
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
// and/or sell copies of the Software, and to permit persons to whom the
|
||||
// Software is furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
||||
// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
||||
// CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
|
||||
// OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
/* adapted from: Timothy Groves - http://www.brandspankingnew.net */
|
||||
var cur_autosug;
|
||||
function hide_autosuggest() { if(cur_autosug)cur_autosug.clearSuggestions(); }
|
||||
|
||||
function AutoSuggest(id, param) {
|
||||
|
||||
this.fld = $i(id);
|
||||
if (!this.fld) {return 0; alert('AutoSuggest: No ID');}
|
||||
|
||||
// init variables
|
||||
this.init();
|
||||
|
||||
// parameters object
|
||||
this.oP = param ? param : {};
|
||||
|
||||
// defaults
|
||||
var k, def = {
|
||||
minchars:1, meth:"get", varname:"input", className:"autosuggest", timeout:4000
|
||||
,delay:1000, offsety:-5, shownoresults: true, noresults: "No results!", maxheight: 250
|
||||
,cache: false, maxentries: 25, fixed_options: false, xdelta: 0, ydelta: 5
|
||||
}
|
||||
|
||||
for (k in def)
|
||||
{
|
||||
if (typeof(this.oP[k]) != typeof(def[k]))
|
||||
this.oP[k] = def[k];
|
||||
}
|
||||
|
||||
// set keyup handler for field
|
||||
// and prevent autocomplete from client
|
||||
var p = this;
|
||||
|
||||
this.fld.onkeypress = function(ev){ if(!(selector && selector.display)) return p.onKeyPress(ev); };
|
||||
this.fld.onkeyup = function(ev){ if(!(selector && selector.display)) return p.onKeyUp(ev); };
|
||||
|
||||
this.fld.setAttribute("autocomplete","off");
|
||||
};
|
||||
|
||||
AutoSuggest.prototype.init = function() {
|
||||
|
||||
this.sInp = "";
|
||||
this.nInpC = 0;
|
||||
this.aSug = [];
|
||||
this.iHigh = 0;
|
||||
|
||||
}
|
||||
|
||||
AutoSuggest.prototype.onKeyPress = function(ev)
|
||||
{
|
||||
|
||||
var key = (window.event) ? window.event.keyCode : ev.keyCode;
|
||||
//var ev = (window.event) ? window.event : ev;
|
||||
//var key = ev.keyCode ? ev.keyCode : ev.charCode;
|
||||
|
||||
// set responses to keydown events in the field
|
||||
// this allows the user to use the arrow keys to scroll through the results
|
||||
// ESCAPE clears the list
|
||||
// TAB sets the current highlighted value
|
||||
//
|
||||
var RETURN = 13;
|
||||
var TAB = 9;
|
||||
var ESC = 27;
|
||||
|
||||
var bubble = 1;
|
||||
|
||||
switch(key)
|
||||
{
|
||||
case TAB:
|
||||
this.setHighlightedValue();
|
||||
bubble = 0;
|
||||
break;
|
||||
case RETURN:
|
||||
this.setHighlightedValue();
|
||||
bubble = 0;
|
||||
break;
|
||||
case ESC:
|
||||
this.clearSuggestions();
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
return bubble;
|
||||
}
|
||||
|
||||
AutoSuggest.prototype.onKeyUp = function(ev)
|
||||
{
|
||||
|
||||
var key = (window.event) ? window.event.keyCode : ev.keyCode;
|
||||
//var ev = (window.event) ? window.event : ev;
|
||||
//var key = ev.keyCode ? ev.keyCode : ev.charCode;
|
||||
|
||||
var ARRUP = 38; var ARRDN = 40;
|
||||
var bubble = 1;
|
||||
|
||||
switch(key) {
|
||||
case ARRUP:
|
||||
this.changeHighlight(key);
|
||||
bubble = 0;
|
||||
break;
|
||||
|
||||
case ARRDN:
|
||||
this.changeHighlight(key);
|
||||
bubble = 0;
|
||||
break;
|
||||
default:
|
||||
if(key!=13) {
|
||||
if(this.oP.fixed_options)
|
||||
this.find_nearest(key);
|
||||
else
|
||||
this.getSuggestions(this.fld.value);
|
||||
}
|
||||
}
|
||||
|
||||
return bubble;
|
||||
}
|
||||
|
||||
AutoSuggest.prototype.clear_user_inp = function() {
|
||||
this.user_inp = '';
|
||||
}
|
||||
|
||||
AutoSuggest.prototype.find_nearest = function (key) {
|
||||
var list = this.ul;
|
||||
var same_key = 0;
|
||||
|
||||
// make the list
|
||||
if (!list) {
|
||||
if(this.aSug) {
|
||||
this.createList(this.aSug);
|
||||
} if(this.aSug[0].value.substr(0,this.user_inp.length).toLowerCase()==String.fromCharCode(key)) {
|
||||
this.resetTimeout();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// values for multiple keystrokes
|
||||
if((this.user_inp.length==1) && this.user_inp == String.fromCharCode(key).toLowerCase()) {
|
||||
same_key = 1;
|
||||
} else {
|
||||
this.user_inp += String.fromCharCode(key).toLowerCase();
|
||||
}
|
||||
|
||||
// clear user keys
|
||||
window.clearTimeout(this.clear_timer);
|
||||
|
||||
// loop over the next after the current
|
||||
var st = this.iHigh;
|
||||
|
||||
// continuation of typing, also check the current value
|
||||
if(!same_key) st--;
|
||||
|
||||
for(var i = st; i<this.aSug.length; i++) {
|
||||
if(this.aSug[i].value.substr(0,this.user_inp.length).toLowerCase()==this.user_inp) {
|
||||
this.setHighlight(i+1);
|
||||
this.resetTimeout();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
this.clear_timer = window.setTimeout('if(cur_autosug)cur_autosug.clear_user_inp()', 3000);
|
||||
|
||||
// begin at the top
|
||||
for(var i = 0; i<st; i++) {
|
||||
if(this.aSug[i].value.substr(0,this.user_inp.length).toLowerCase()==this.user_inp) {
|
||||
this.setHighlight(i+1);
|
||||
this.resetTimeout();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
AutoSuggest.prototype.getSuggestions = function (val)
|
||||
{
|
||||
// if input stays the same, do nothing
|
||||
if (val == this.sInp) return 0;
|
||||
|
||||
// kill list
|
||||
if(this.body && this.body.parentNode)
|
||||
this.body.parentNode.removeChild(this.body);
|
||||
|
||||
this.sInp = val;
|
||||
|
||||
// input length is less than the min required to trigger a request
|
||||
// do nothing
|
||||
if (val.length < this.oP.minchars)
|
||||
{
|
||||
this.aSug = [];
|
||||
this.nInpC = val.length;
|
||||
return 0;
|
||||
}
|
||||
|
||||
var ol = this.nInpC; // old length
|
||||
this.nInpC = val.length ? val.length : 0;
|
||||
|
||||
// if caching enabled, and user is typing (ie. length of input is increasing)
|
||||
// filter results out of aSuggestions from last request
|
||||
var l = this.aSug.length;
|
||||
if (this.nInpC > ol && l && l<this.oP.maxentries && this.oP.cache)
|
||||
{
|
||||
var arr = [];
|
||||
for (var i=0;i<l;i++)
|
||||
{
|
||||
if (this.aSug[i].value.substr(0,val.length).toLowerCase() == val.toLowerCase())
|
||||
arr.push( this.aSug[i] );
|
||||
}
|
||||
this.aSug = arr;
|
||||
|
||||
this.createList(this.aSug);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
// do new request
|
||||
{
|
||||
var me = this;
|
||||
var input = this.sInp;
|
||||
clearTimeout(this.ajID);
|
||||
this.ajID = setTimeout( function() { me.doAjaxRequest(input) }, this.oP.delay );
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
AutoSuggest.prototype.doAjaxRequest = function (input)
|
||||
{
|
||||
// check that saved input is still the value of the field
|
||||
if (input != this.fld.value)
|
||||
return false;
|
||||
|
||||
var me = this;
|
||||
|
||||
var q = '';
|
||||
|
||||
this.oP.link_field.set_get_query();
|
||||
if(this.oP.link_field.get_query) {
|
||||
if(cur_frm)var doc = locals[cur_frm.doctype][cur_frm.docname];
|
||||
q = this.oP.link_field.get_query(doc, this.oP.link_field.doctype, this.oP.link_field.docname);
|
||||
}
|
||||
|
||||
// do ajax request
|
||||
this.fld.old_bg = this.fld.style.backgroundColor;
|
||||
$y(this.fld, {backgroundColor:'#FFC'});
|
||||
$c('webnotes.widgets.search.search_link', args={
|
||||
'txt': this.fld.value,
|
||||
'dt':this.oP.link_field.df.options,
|
||||
'query':q }
|
||||
, function(r,rt) {
|
||||
$y(me.fld, {backgroundColor:(me.fld.old_bg ? me.fld.old_bg : '#FFF')});
|
||||
me.setSuggestions(r, rt, input);
|
||||
});
|
||||
|
||||
return;
|
||||
};
|
||||
|
||||
|
||||
AutoSuggest.prototype.setSuggestions = function (r, rt, input)
|
||||
{
|
||||
// if field input no longer matches what was passed to the request
|
||||
// don't show the suggestions
|
||||
if (input != this.fld.value)
|
||||
return false;
|
||||
|
||||
this.aSug = [];
|
||||
|
||||
if (this.oP.json) {
|
||||
//var jsondata = eval('(' + req.responseText + ')');
|
||||
var jsondata = eval('(' + rt + ')');
|
||||
if(jsondata) {
|
||||
for (var i=0;i<jsondata.results.length;i++) {
|
||||
this.aSug.push( { 'id':jsondata.results[i].id, 'value':jsondata.results[i].value, 'info':jsondata.results[i].info } );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.createList(this.aSug);
|
||||
};
|
||||
|
||||
AutoSuggest.prototype.createList = function(arr) {
|
||||
|
||||
if(cur_autosug && cur_autosug!= this)
|
||||
cur_autosug.clearSuggestions();
|
||||
|
||||
this.aSug = arr;
|
||||
this.user_inp = '';
|
||||
|
||||
var me = this;
|
||||
|
||||
var pos = objpos(this.fld); pos.y += this.oP.ydelta; pos.x += this.oP.xdelta;
|
||||
if(pos.x <= 0 || pos.y <= 0) return; // field hidden
|
||||
|
||||
// get rid of old list and clear the list removal timeout
|
||||
if(this.body && this.body.parentNode)
|
||||
this.body.parentNode.removeChild(this.body);
|
||||
|
||||
this.killTimeout();
|
||||
|
||||
// if no results, and shownoresults is false, do nothing
|
||||
if (arr.length == 0 && !this.oP.shownoresults)
|
||||
return false;
|
||||
|
||||
// create holding div
|
||||
var div = $ce("div", {className:this.oP.className});
|
||||
top_index++;
|
||||
div.style.zIndex = 1100;
|
||||
div.isactive = 1;
|
||||
|
||||
// create and populate ul
|
||||
this.ul = $ce("ul", {id:"as_ul"}); var ul = this.ul;
|
||||
|
||||
// loop throught arr of suggestionscreating an LI element for each suggestion
|
||||
for (var i=0;i<arr.length;i++) {
|
||||
// format output with the input enclosed in a EM element
|
||||
// (as HTML, not DOM)
|
||||
//
|
||||
var val = arr[i].value;
|
||||
|
||||
if(this.oP.fixed_options) {
|
||||
var output = val;
|
||||
} else {
|
||||
var st = val.toLowerCase().indexOf( this.sInp.toLowerCase() );
|
||||
var output = val.substring(0,st) + "<em>" + val.substring(st, st+this.sInp.length) + "</em>" + val.substring(st+this.sInp.length);
|
||||
}
|
||||
var span = $ce("span", {}, output, true);
|
||||
span.isactive = 1;
|
||||
if (arr[i].info != "")
|
||||
{
|
||||
var small = $ce("small", {}, arr[i].info);
|
||||
span.appendChild(small);
|
||||
small.isactive = 1
|
||||
}
|
||||
|
||||
var a = $a(null, "a");
|
||||
|
||||
a.appendChild(span);
|
||||
|
||||
a.name = i+1;
|
||||
a.onclick = function (e) {
|
||||
me.setHighlightedValue();
|
||||
};
|
||||
a.onmouseover = function () { me.setHighlight(this.name); };
|
||||
a.isactive = 1;
|
||||
|
||||
var li = $ce( "li", {}, a );
|
||||
|
||||
// empty option
|
||||
if(!val) {
|
||||
$y(span,{height:'12px'});
|
||||
}
|
||||
|
||||
ul.appendChild( li );
|
||||
}
|
||||
|
||||
// no results
|
||||
//
|
||||
if (arr.length == 0 && this.oP.shownoresults) {
|
||||
var li = $ce( "li", {className:"as_warning"}, this.oP.noresults);
|
||||
ul.appendChild( li );
|
||||
}
|
||||
div.appendChild( ul );
|
||||
// get position of target textfield
|
||||
// set width of holding div to width of field
|
||||
//
|
||||
|
||||
var mywid = cint(this.fld.offsetWidth);
|
||||
if(this.oP.fixed_options) {
|
||||
mywid += 20;
|
||||
}
|
||||
|
||||
if(cint(mywid) < 100) mywid = 100;
|
||||
var left = pos.x - ((mywid - this.fld.offsetWidth)/2);
|
||||
if(left<0) {
|
||||
mywid = mywid + (left/2); left = 0;
|
||||
}
|
||||
|
||||
div.style.left = left + "px";
|
||||
div.style.top = ( pos.y + this.fld.offsetHeight + this.oP.offsety ) + "px";
|
||||
div.style.width = mywid + 'px';
|
||||
|
||||
// set mouseover functions for div
|
||||
// when mouse me leaves div, set a timeout to remove the list after an interval
|
||||
// when mouse enters div, kill the timeout so the list won't be removed
|
||||
//
|
||||
div.onmouseover = function(){ me.killTimeout() };
|
||||
div.onmouseout = function(){ me.resetTimeout() };
|
||||
|
||||
// add DIV to document
|
||||
//
|
||||
//document.getElementsByTagName("body")[0].appendChild(div);
|
||||
popup_cont.appendChild(div);
|
||||
|
||||
//height
|
||||
if(cint(div.clientHeight) >= this.oP.maxheight) {
|
||||
div.original_height = cint(div.clientHeight);
|
||||
$y(div,{height: this.oP.maxheight+'px', overflowY:'auto'});
|
||||
div.scrollbars = true;
|
||||
}
|
||||
|
||||
this.body = div;
|
||||
|
||||
// currently no item is highlighted
|
||||
//
|
||||
|
||||
// if value, then hilight value
|
||||
this.iHigh = 0;
|
||||
|
||||
if(!this.iHigh)
|
||||
this.changeHighlight(40); // hilight first
|
||||
|
||||
// remove list after an interval
|
||||
//
|
||||
this.resetTimeout();
|
||||
};
|
||||
|
||||
AutoSuggest.prototype.changeHighlight = function(key)
|
||||
{
|
||||
var list = this.ul;
|
||||
|
||||
if (!list) {
|
||||
if(this.aSug)
|
||||
this.createList(this.aSug);
|
||||
return false;
|
||||
}
|
||||
|
||||
var n;
|
||||
if (key == 40)
|
||||
n = this.iHigh + 1;
|
||||
else if (key == 38)
|
||||
n = this.iHigh - 1;
|
||||
|
||||
if (n > list.childNodes.length)
|
||||
n = list.childNodes.length;
|
||||
if (n < 1)
|
||||
n = 1;
|
||||
this.setHighlight(n);
|
||||
};
|
||||
|
||||
AutoSuggest.prototype.setHighlight = function(n)
|
||||
{
|
||||
this.resetTimeout();
|
||||
var list = this.ul;
|
||||
if (!list)
|
||||
return false;
|
||||
|
||||
if (this.iHigh > 0)
|
||||
this.clearHighlight();
|
||||
|
||||
this.iHigh = Number(n);
|
||||
|
||||
var ele = list.childNodes[this.iHigh-1];
|
||||
ele.className = "as_highlight";
|
||||
|
||||
// set scroll
|
||||
if(this.body.scrollbars) {
|
||||
var cur_y = 0;
|
||||
for(var i=0; i<this.iHigh-1; i++)
|
||||
cur_y += ($.browser.msie ? list.childNodes[i].offsetHeight : list.childNodes[i].clientHeight);
|
||||
|
||||
// scroll up
|
||||
if(cur_y < this.body.scrollTop)
|
||||
this.body.scrollTop = cur_y;
|
||||
|
||||
// scroll down
|
||||
ff_delta = ($.browser.mozilla ? cint(this.iHigh/2) : 0);
|
||||
var h = ($.browser.msie ? ele.offsetHeight : ele.clientHeight);
|
||||
if(cur_y >= (this.body.scrollTop + this.oP.maxheight - h))
|
||||
this.body.scrollTop = cur_y - this.oP.maxheight + h + ff_delta;
|
||||
}
|
||||
|
||||
// no values returned
|
||||
if(!this.aSug[this.iHigh-1]) return;
|
||||
};
|
||||
|
||||
|
||||
AutoSuggest.prototype.clearHighlight = function()
|
||||
{
|
||||
var list = this.ul;
|
||||
if (!list)
|
||||
return false;
|
||||
if (this.iHigh > 0) {
|
||||
list.childNodes[this.iHigh-1].className = "";
|
||||
this.iHigh = 0;
|
||||
}
|
||||
};
|
||||
|
||||
AutoSuggest.prototype.setHighlightedValue = function ()
|
||||
{
|
||||
if (this.iHigh) {
|
||||
this.sInp = this.aSug[ this.iHigh-1 ].value;
|
||||
|
||||
// set the value
|
||||
if(this.set_input_value) {
|
||||
this.set_input_value(this.sInp);
|
||||
} else {
|
||||
this.fld.value = this.sInp;
|
||||
}
|
||||
|
||||
this.clearSuggestions();
|
||||
this.killTimeout();
|
||||
|
||||
if(this.fld.onchange){
|
||||
cur_autosug = null;
|
||||
this.fld.onchange();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
AutoSuggest.prototype.killTimeout = function() {
|
||||
cur_autosug = this;
|
||||
clearTimeout(this.toID);
|
||||
clearTimeout(this.clear_timer);
|
||||
};
|
||||
|
||||
AutoSuggest.prototype.resetTimeout = function() {
|
||||
cur_autosug = this;
|
||||
clearTimeout(this.toID);
|
||||
clearTimeout(this.clear_timer);
|
||||
this.toID = setTimeout(function () { if(cur_autosug)cur_autosug.clearSuggestions(1); }, this.oP.timeout);
|
||||
};
|
||||
|
||||
AutoSuggest.prototype.clearSuggestions = function (from_timeout) {
|
||||
this.killTimeout();
|
||||
cur_autosug = null;
|
||||
var me = this;
|
||||
if (this.body) { $dh(this.body); delete this.body; }
|
||||
|
||||
if(!this.ul) return;
|
||||
|
||||
if(this.ul)
|
||||
delete this.ul;
|
||||
this.iHigh = 0;
|
||||
|
||||
|
||||
// accept the value
|
||||
if(from_timeout && this.fld.field_object && !this.oP.fixed_options) {
|
||||
// call onchange
|
||||
// we do not call onchange from the link field if autosuggest options are open
|
||||
if(this.fld.onchange)this.fld.onchange();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* create element */
|
||||
$ce = function ( type, attr, cont, html )
|
||||
{
|
||||
var ne = document.createElement( type );
|
||||
if (!ne) return 0;
|
||||
|
||||
for (var a in attr) ne[a] = attr[a];
|
||||
|
||||
var t = typeof(cont);
|
||||
|
||||
if (t == "string" && !html) ne.appendChild( document.createTextNode(cont) );
|
||||
else if (t == "string" && html) ne.innerHTML = cont;
|
||||
else if (t == "object") ne.appendChild( cont );
|
||||
|
||||
return ne;
|
||||
};
|
||||
|
|
@ -75,7 +75,7 @@ Dialog.prototype.make_row = function(d) {
|
|||
var c1 = $td(t,0,0);
|
||||
var c2 = $td(t,0,1);
|
||||
if(d[0]!='Check' && d[0]!='Button')
|
||||
$t(c1, d[1]);
|
||||
$(c1).text(d[1]);
|
||||
}
|
||||
|
||||
if(d[0]=='HTML') {
|
||||
|
|
@ -134,7 +134,7 @@ Dialog.prototype.make_row = function(d) {
|
|||
if(btn._onclick) btn._onclick(me) }, null, null, 1);
|
||||
b.dialog = me;
|
||||
if(!this.first_button) {
|
||||
$(b).addClass('btn-primary');
|
||||
$(b).addClass('btn-info');
|
||||
this.first_button = true;
|
||||
}
|
||||
if(d[2]) {
|
||||
|
|
|
|||
|
|
@ -58,5 +58,5 @@ function export_csv(q, report_name, sc_id, is_simple, filter_values, colnames) {
|
|||
if(colnames)
|
||||
args.colnames = colnames.join(',');
|
||||
args.report_name = report_name ? report_name : '';
|
||||
open_url_post(outUrl, args);
|
||||
open_url_post(wn.request.url, args);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ _e.make = function() {
|
|||
}
|
||||
|
||||
d.onhide = function() {
|
||||
hide_autosuggest();
|
||||
|
||||
}
|
||||
|
||||
d.make_body([
|
||||
|
|
@ -107,57 +107,53 @@ _e.make = function() {
|
|||
|
||||
$td(d.rows['Format'].tab,0,1).cur_sel = d.widgets['Format'];
|
||||
|
||||
// ---- add auto suggest ----
|
||||
var opts = { script: '', json: true, maxresults: 10 };
|
||||
function split( val ) {
|
||||
return val.split( /,\s*/ );
|
||||
}
|
||||
function extractLast( term ) {
|
||||
return split(term).pop();
|
||||
}
|
||||
|
||||
wn.require('lib/js/legacy/widgets/autosuggest.js');
|
||||
|
||||
var as = new AutoSuggest(d.widgets['To'], opts);
|
||||
as.custom_select = function(txt, sel) {
|
||||
// ---- add to the last comma ----
|
||||
var r = '';
|
||||
var tl = txt.split(',');
|
||||
for(var i=0;i<tl.length-1;i++) r=r+tl[i]+',';
|
||||
r = r+(r?' ':'')+sel;
|
||||
if(r[r.length-1]==NEWLINE) r=substr(0,r.length-1);
|
||||
return r;
|
||||
}
|
||||
|
||||
var emailto = d.widgets['To']
|
||||
|
||||
as.set_input_value = function(new_txt) {
|
||||
if(emailto.value && emailto.value.indexOf(',')!=-1) {
|
||||
var txt = emailto.value.split(',');
|
||||
txt.splice(txt.length - 1, 1, new_txt);
|
||||
for(var i=0;i<txt.length-1;i++) txt[i] = strip(txt[i]);
|
||||
emailto.value = txt.join(', ');
|
||||
} else {
|
||||
emailto.value = new_txt;
|
||||
}
|
||||
}
|
||||
|
||||
// ---- override server call ----
|
||||
as.doAjaxRequest = function(txt) {
|
||||
var pointer = as; var q = '';
|
||||
|
||||
// ---- get last few letters typed ----
|
||||
var last_txt = txt.split(',');
|
||||
last_txt = last_txt[last_txt.length-1];
|
||||
|
||||
// ---- show options ----
|
||||
var call_back = function(r,rt) {
|
||||
as.aSug = [];
|
||||
if(!r.cl) return;
|
||||
for (var i=0;i<r.cl.length;i++) {
|
||||
as.aSug.push({'id':r.cl[i], 'value':r.cl[i], 'info':''});
|
||||
}
|
||||
as.createList(as.aSug);
|
||||
}
|
||||
$c('webnotes.utils.email_lib.get_contact_list',{'select':_e.email_as_field, 'from':_e.email_as_dt, 'where':_e.email_as_in, 'txt':(last_txt ? strip(last_txt) : '%')},call_back);
|
||||
return;
|
||||
}
|
||||
|
||||
var sel;
|
||||
$(d.widgets['To'])
|
||||
.bind( "keydown", function(event) {
|
||||
if (event.keyCode === $.ui.keyCode.TAB &&
|
||||
$(this).data( "autocomplete" ).menu.active ) {
|
||||
event.preventDefault();
|
||||
}
|
||||
})
|
||||
.autocomplete({
|
||||
source: function(request, response) {
|
||||
wn.call({
|
||||
method:'webnotes.utils.email_lib.get_contact_list',
|
||||
args: {
|
||||
'select': _e.email_as_field,
|
||||
'from': _e.email_as_dt,
|
||||
'where': _e.email_as_in,
|
||||
'txt': extractLast(request.term).value || '%'
|
||||
},
|
||||
callback: function(r) {
|
||||
response($.ui.autocomplete.filter(
|
||||
r.cl || [], extractLast(request.term)));
|
||||
}
|
||||
});
|
||||
},
|
||||
focus: function() {
|
||||
// prevent value inserted on focus
|
||||
return false;
|
||||
},
|
||||
select: function( event, ui ) {
|
||||
var terms = split( this.value );
|
||||
// remove the current input
|
||||
terms.pop();
|
||||
// add the selected item
|
||||
terms.push( ui.item.value );
|
||||
// add placeholder to get the comma-and-space at the end
|
||||
terms.push( "" );
|
||||
this.value = terms.join( ", " );
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
_e.dialog = d;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,11 +43,11 @@ Field.prototype.make_body = function() {
|
|||
|
||||
// parent element
|
||||
if(this.parent)
|
||||
this.wrapper = $a(this.parent, 'div');
|
||||
this.wrapper = $a(this.parent, (this.with_label ? 'div' : 'span'));
|
||||
else
|
||||
this.wrapper = document.createElement('div');
|
||||
this.wrapper = document.createElement((this.with_label ? 'div' : 'span'));
|
||||
|
||||
this.label_area = $a(this.wrapper, 'div', '', {margin:'8px 0px 2px 0px'});
|
||||
this.label_area = $a(this.wrapper, 'div', '', {margin:'0px 0px 2px 0px'});
|
||||
|
||||
if(ischk && !this.in_grid) {
|
||||
this.input_area = $a(this.label_area, 'span', '', {marginRight:'4px'});
|
||||
|
|
@ -56,7 +56,7 @@ Field.prototype.make_body = function() {
|
|||
|
||||
// label
|
||||
if(this.with_label) {
|
||||
this.label_span = $a(this.label_area, 'span', 'field_label')
|
||||
this.label_span = $a(this.label_area, 'span', 'small')
|
||||
|
||||
// error icon
|
||||
this.label_icon = $a(this.label_area,'img','',{margin:'-3px 4px -3px 4px'}); $dh(this.label_icon);
|
||||
|
|
@ -75,8 +75,8 @@ Field.prototype.make_body = function() {
|
|||
|
||||
// make the input areas
|
||||
if(!this.input_area) {
|
||||
this.input_area = $a(this.wrapper, 'div');
|
||||
this.disp_area = $a(this.wrapper, 'div');
|
||||
this.input_area = $a(this.wrapper, (this.with_label ? 'div' : 'span'));
|
||||
this.disp_area = $a(this.wrapper, (this.with_label ? 'div' : 'span'));
|
||||
}
|
||||
|
||||
// apply style
|
||||
|
|
@ -84,10 +84,10 @@ Field.prototype.make_body = function() {
|
|||
if(this.label_area) $dh(this.label_area);
|
||||
} else {
|
||||
this.input_area.className = 'input_area';
|
||||
$y(this.wrapper,{marginBottom:'4px'});
|
||||
$y(this.wrapper,{marginBottom:'9px'});
|
||||
|
||||
// set description
|
||||
this.set_description();
|
||||
this.set_description();
|
||||
}
|
||||
|
||||
// bind label refresh
|
||||
|
|
@ -95,6 +95,7 @@ Field.prototype.make_body = function() {
|
|||
if(this.onmake)this.onmake();
|
||||
}
|
||||
|
||||
|
||||
Field.prototype.set_max_width = function() {
|
||||
var no_max = ['Code', 'Text Editor', 'Text', 'Table', 'HTML']
|
||||
if(this.wrapper && this.layout_cell && this.layout_cell.parentNode.cells
|
||||
|
|
@ -114,12 +115,11 @@ Field.prototype.set_description = function() {
|
|||
if(this.df.description) {
|
||||
// parent
|
||||
var p = in_list(['Text Editor', 'Code', 'Check'], this.df.fieldtype) ? this.label_area : this.wrapper;
|
||||
|
||||
this.desc_area = $a(p, 'div', 'field_description', '', this.df.description)
|
||||
this.desc_area = $a(p, 'div', 'help small', '', this.df.description)
|
||||
|
||||
// padding on the bottom
|
||||
if(in_list(['Text Editor', 'Code'], this.df.fieldtype))
|
||||
$(this.desc_area).addClass('field_description_top');
|
||||
$(this.desc_area).addClass('help small');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -133,9 +133,6 @@ Field.prototype.get_status = function() {
|
|||
if(this.not_in_form) {
|
||||
return 'Write';
|
||||
}
|
||||
|
||||
var fn = this.df.fieldname?this.df.fieldname:this.df.label;
|
||||
this.df = get_field(this.doctype, fn, this.docname);
|
||||
|
||||
if(!this.df.permlevel) this.df.permlevel = 0;
|
||||
|
||||
|
|
@ -299,9 +296,6 @@ Field.prototype.set = function(val) {
|
|||
if((!this.docname) && this.grid) {
|
||||
this.docname = this.grid.add_newrow(); // new row
|
||||
}
|
||||
// cleanup ms word quotes
|
||||
if(in_list(['Data','Text','Small Text','Code'], this.df.fieldtype))
|
||||
val = clean_smart_quotes(val);
|
||||
|
||||
var set_val = val;
|
||||
if(this.validate)set_val = this.validate(val);
|
||||
|
|
@ -402,25 +396,35 @@ DataField.prototype.make_input = function() {
|
|||
|
||||
this.get_value= function() {
|
||||
var v = this.input.value;
|
||||
if(this.validate)v = this.validate(v);
|
||||
if(this.validate)
|
||||
v = this.validate(v);
|
||||
return v;
|
||||
}
|
||||
|
||||
this.input.name = this.df.fieldname;
|
||||
this.input.onchange = function() {
|
||||
|
||||
$(this.input).change(function() {
|
||||
me.set_value($(this).val());
|
||||
});
|
||||
|
||||
this.set_value = function(val) {
|
||||
if(!me.last_value)me.last_value='';
|
||||
if(me.validate)
|
||||
me.input.value = me.validate(me.input.value);
|
||||
me.set(me.input.value);
|
||||
|
||||
if(me.validate) {
|
||||
val = me.validate(val);
|
||||
me.input.value = val;
|
||||
}
|
||||
|
||||
me.set(val);
|
||||
if(me.format_input)
|
||||
me.format_input();
|
||||
if(in_list(['Currency','Float','Int'], me.df.fieldtype)) {
|
||||
if(flt(me.last_value)==flt(me.input.value)) {
|
||||
me.last_value = me.input.value;
|
||||
if(flt(me.last_value)==flt(val)) {
|
||||
me.last_value = val;
|
||||
return; // do not run trigger
|
||||
}
|
||||
}
|
||||
me.last_value = me.input.value;
|
||||
me.last_value = val;
|
||||
me.run_trigger();
|
||||
}
|
||||
this.input.set_input = function(val) {
|
||||
|
|
@ -433,21 +437,29 @@ DataField.prototype.make_input = function() {
|
|||
// -----------------------
|
||||
|
||||
if(this.df.options=='Suggest') {
|
||||
wn.require('lib/js/legacy/widgets/autosuggest.js');
|
||||
|
||||
// add auto suggest
|
||||
if(this.suggest_icon) $di(this.suggest_icon);
|
||||
this.set_get_query = function() { }
|
||||
this.get_query = function(doc, dt, dn) {
|
||||
return repl('SELECT DISTINCT `%(fieldname)s` FROM `tab%(dt)s` WHERE `%(fieldname)s` LIKE "%s" LIMIT 50', {fieldname:me.df.fieldname, dt:me.df.parent})
|
||||
}
|
||||
var opts = {
|
||||
script: '',
|
||||
json: true,
|
||||
maxresults: 10,
|
||||
link_field: this
|
||||
};
|
||||
this.as = new AutoSuggest(this.input, opts);
|
||||
$(me.input).autocomplete({
|
||||
source: function(request, response) {
|
||||
wn.call({
|
||||
method:'webnotes.widgets.search.search_link',
|
||||
args: {
|
||||
'txt': request.term,
|
||||
'dt': me.df.options,
|
||||
'query': repl('SELECT DISTINCT `%(fieldname)s` FROM \
|
||||
`tab%(dt)s` WHERE `%(fieldname)s` LIKE "%s" LIMIT 50',
|
||||
{fieldname:me.df.fieldname, dt:me.df.parent})
|
||||
},
|
||||
callback: function(r) {
|
||||
response(r.results);
|
||||
}
|
||||
});
|
||||
},
|
||||
select: function(event, ui) {
|
||||
me.set_input_value(ui.item.value);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
DataField.prototype.validate = function(v) {
|
||||
|
|
@ -515,9 +527,6 @@ DateField.prototype.make_input = function() {
|
|||
|
||||
this.input = $a(this.input_area, 'input');
|
||||
|
||||
// load the style
|
||||
wn.require('lib/css/legacy/jquery-ui.css');
|
||||
|
||||
$(this.input).datepicker({
|
||||
dateFormat: me.user_fmt.replace('yyyy','yy'),
|
||||
altFormat:'yy-mm-dd',
|
||||
|
|
@ -575,9 +584,6 @@ DateField.prototype.validate = function(v) {
|
|||
|
||||
// ======================================================================================
|
||||
|
||||
// for ensuring in AutoSuggest that 2 values are not set in quick succession due to un intentional event call
|
||||
var _link_onchange_flag = null;
|
||||
|
||||
// reference when a new record is created via link
|
||||
function LinkField() { } LinkField.prototype = new Field();
|
||||
LinkField.prototype.make_input = function() {
|
||||
|
|
@ -602,7 +608,7 @@ LinkField.prototype.make_input = function() {
|
|||
|
||||
me.txt.field_object = this;
|
||||
// set onchange triggers
|
||||
me.set_onchange();
|
||||
|
||||
me.input.set_input = function(val) {
|
||||
if(val==undefined)val='';
|
||||
me.txt.value = val;
|
||||
|
|
@ -610,17 +616,39 @@ LinkField.prototype.make_input = function() {
|
|||
|
||||
me.get_value = function() { return me.txt.value; }
|
||||
|
||||
wn.require('lib/js/legacy/widgets/autosuggest.js');
|
||||
|
||||
// add auto suggest
|
||||
var opts = {
|
||||
script: '',
|
||||
json: true,
|
||||
maxresults: 10,
|
||||
link_field: me
|
||||
$(me.txt).autocomplete({
|
||||
source: function(request, response) {
|
||||
wn.call({
|
||||
method:'webnotes.widgets.search.search_link',
|
||||
args: {
|
||||
'txt': request.term,
|
||||
'dt': me.df.options,
|
||||
'query': me.get_custom_query()
|
||||
},
|
||||
callback: function(r) {
|
||||
response(r.results);
|
||||
},
|
||||
});
|
||||
},
|
||||
select: function(event, ui) {
|
||||
me.set_input_value(ui.item.value);
|
||||
return false;
|
||||
}
|
||||
}).data('autocomplete')._renderItem = function(ul, item) {
|
||||
return $('<li></li>')
|
||||
.data('item.autocomplete', item)
|
||||
.append(repl('<a>%(label)s<br><span style="font-size:10px">%(info)s</span></a>', item))
|
||||
.appendTo(ul);
|
||||
};
|
||||
this.as = new AutoSuggest(me.txt, opts);
|
||||
|
||||
}
|
||||
|
||||
LinkField.prototype.get_custom_query = function() {
|
||||
this.set_get_query();
|
||||
if(this.get_query) {
|
||||
if(cur_frm)
|
||||
var doc = locals[cur_frm.doctype][cur_frm.docname];
|
||||
return this.get_query(doc, this.doctype, this.docname);
|
||||
}
|
||||
}
|
||||
|
||||
LinkField.prototype.setup_buttons = function() {
|
||||
|
|
@ -662,61 +690,61 @@ LinkField.prototype.setup_buttons = function() {
|
|||
}
|
||||
}
|
||||
|
||||
LinkField.prototype.set_onchange = function() {
|
||||
LinkField.prototype.set_input_value = function(val) {
|
||||
var me = this;
|
||||
me.txt.onchange = function(e) {
|
||||
if(cur_autosug)return; // still setting value
|
||||
|
||||
// check values are not set in quick succession due to un-intentional event call
|
||||
if(_link_onchange_flag) { return;}
|
||||
_link_onchange_flag = 1;
|
||||
|
||||
// refresh mandatory style
|
||||
me.refresh_label_icon();
|
||||
|
||||
// not in form, do nothing
|
||||
if(me.not_in_form) {
|
||||
_link_onchange_flag = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
// same value, do nothing
|
||||
if(cur_frm) {
|
||||
if(me.txt.value == locals[me.doctype][me.docname][me.df.fieldname]) {
|
||||
me.set(me.txt.value); // one more time, grid bug?
|
||||
me.run_trigger(); // wanted - called as refresh?
|
||||
setTimeout('_link_onchange_flag = 0', 500);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
me.set(me.txt.value);
|
||||
|
||||
// deselect cell if in grid
|
||||
if(_f.cur_grid_cell)
|
||||
_f.cur_grid_cell.grid.cell_deselect();
|
||||
|
||||
// run trigger if value is cleared
|
||||
if(!me.txt.value) {
|
||||
me.run_trigger();
|
||||
setTimeout('_link_onchange_flag = 0', 500);
|
||||
return;
|
||||
// refresh mandatory style
|
||||
me.refresh_label_icon();
|
||||
|
||||
// not in form, do nothing
|
||||
if(me.not_in_form) {
|
||||
$(this.txt).val(val);
|
||||
return;
|
||||
}
|
||||
|
||||
// same value, do nothing
|
||||
if(cur_frm) {
|
||||
if(val == locals[me.doctype][me.docname][me.df.fieldname]) {
|
||||
me.set(val); // one more time, grid bug?
|
||||
me.run_trigger(); // wanted - called as refresh?
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// set in locals
|
||||
me.set(val);
|
||||
|
||||
// deselect cell if in grid
|
||||
if(_f.cur_grid_cell)
|
||||
_f.cur_grid_cell.grid.cell_deselect();
|
||||
|
||||
// run trigger if value is cleared
|
||||
if(!val) {
|
||||
me.run_trigger();
|
||||
return;
|
||||
}
|
||||
|
||||
// validate the value just entered
|
||||
var fetch = '';
|
||||
if(cur_frm.fetch_dict[me.df.fieldname])
|
||||
fetch = cur_frm.fetch_dict[me.df.fieldname].columns.join(', ');
|
||||
|
||||
$c('webnotes.widgets.form.utils.validate_link', {'value':me.txt.value, 'options':me.df.options, 'fetch': fetch}, function(r,rt) {
|
||||
setTimeout('_link_onchange_flag = 0', 500);
|
||||
|
||||
// validate the value just entered
|
||||
var fetch = '';
|
||||
if(cur_frm.fetch_dict[me.df.fieldname])
|
||||
fetch = cur_frm.fetch_dict[me.df.fieldname].columns.join(', ');
|
||||
|
||||
$c('webnotes.widgets.form.utils.validate_link', {
|
||||
'value':val,
|
||||
'options':me.df.options,
|
||||
'fetch': fetch
|
||||
},
|
||||
function(r,rt) {
|
||||
if(selector && selector.display) return; // selecting from popup
|
||||
|
||||
|
||||
if(r.message=='Ok') {
|
||||
// set fetch values
|
||||
if(r.fetch_values) me.set_fetch_values(r.fetch_values);
|
||||
if($(me.txt).val()!=val) {
|
||||
me.set_input(val);
|
||||
}
|
||||
|
||||
if(r.fetch_values)
|
||||
me.set_fetch_values(r.fetch_values);
|
||||
|
||||
me.run_trigger();
|
||||
} else {
|
||||
var astr = '';
|
||||
|
|
@ -725,10 +753,10 @@ LinkField.prototype.set_onchange = function() {
|
|||
me.txt.value = '';
|
||||
me.set('');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
LinkField.prototype.set_fetch_values = function(fetch_values) {
|
||||
var fl = cur_frm.fetch_dict[this.df.fieldname].fields;
|
||||
var changed_fields = [];
|
||||
|
|
@ -784,7 +812,9 @@ IntField.prototype.format_input = function() {
|
|||
|
||||
function FloatField() { } FloatField.prototype = new DataField();
|
||||
FloatField.prototype.validate = function(v) {
|
||||
var v= parseFloat(v); if(isNaN(v))return null;
|
||||
var v= parseFloat(v);
|
||||
if(isNaN(v))
|
||||
return null;
|
||||
return v;
|
||||
};
|
||||
FloatField.prototype.format_input = function() {
|
||||
|
|
@ -804,7 +834,7 @@ CurrencyField.prototype.format_input = function() {
|
|||
|
||||
CurrencyField.prototype.validate = function(v) {
|
||||
if(v==null || v=='')
|
||||
return 0;
|
||||
return 0;
|
||||
return flt(v,2);
|
||||
}
|
||||
CurrencyField.prototype.set_disp = function(val) {
|
||||
|
|
@ -906,7 +936,7 @@ function make_text_dialog() {
|
|||
this.widgets['Enter Text'].focus();
|
||||
this.widgets['Description'].innerHTML = ''
|
||||
if(this.field.df.description)
|
||||
$a(this.widgets['Description'], 'div', 'field_description', '', this.field.df.description);
|
||||
$a(this.widgets['Description'], 'div', 'help small', '', this.field.df.description);
|
||||
}
|
||||
d.onhide = function() {
|
||||
if(_f.cur_grid_cell)
|
||||
|
|
@ -960,7 +990,7 @@ SelectField.prototype.make_input = function() {
|
|||
this.set_as_single = function() {
|
||||
var i = this.input;
|
||||
i.multiple = false;
|
||||
i.style.height = null; // default
|
||||
i.style.height = null;
|
||||
if(i.lab)$dh(i.lab)
|
||||
}
|
||||
|
||||
|
|
@ -1019,7 +1049,7 @@ SelectField.prototype.make_input = function() {
|
|||
if(me.input.multiple) {
|
||||
for(var i=0; i<me.input.options.length; i++) {
|
||||
me.input.options[i].selected = 0;
|
||||
if(me.input.options[i].value && inList(v.split(","), me.input.options[i].value))
|
||||
if(me.input.options[i].value && inList(typeof(v)=='string'?v.split(","):v, me.input.options[i].value))
|
||||
me.input.options[i].selected = 1;
|
||||
}
|
||||
} else if(in_list(me.options_list, v)){
|
||||
|
|
|
|||
|
|
@ -41,33 +41,7 @@
|
|||
|
||||
wn.provide('_f');
|
||||
|
||||
// called from table edit
|
||||
_f.edit_record = function(dt, dn) {
|
||||
d = _f.frm_dialog;
|
||||
|
||||
var show_dialog = function() {
|
||||
var f = frms[dt];
|
||||
if(f.meta.istable) {
|
||||
f.parent_doctype = cur_frm.doctype;
|
||||
f.parent_docname = cur_frm.docname;
|
||||
}
|
||||
|
||||
d.cur_frm = f;
|
||||
d.dn = dn;
|
||||
d.table_form = f.meta.istable;
|
||||
|
||||
// show the form
|
||||
f.refresh(dn);
|
||||
}
|
||||
|
||||
// load
|
||||
if(!frms[dt]) {
|
||||
_f.add_frm(dt, show_dialog, null);
|
||||
} else {
|
||||
show_dialog();
|
||||
}
|
||||
|
||||
}
|
||||
_f.frms = {};
|
||||
|
||||
_f.Frm = function(doctype, parent) {
|
||||
this.docname = '';
|
||||
|
|
@ -77,10 +51,7 @@ _f.Frm = function(doctype, parent) {
|
|||
var me = this;
|
||||
this.is_editable = {};
|
||||
this.opendocs = {};
|
||||
this.cur_section = {};
|
||||
this.sections = [];
|
||||
this.sections_by_label = {};
|
||||
this.section_count;
|
||||
this.grids = [];
|
||||
this.cscript = {};
|
||||
this.pformat = {};
|
||||
|
|
@ -88,16 +59,35 @@ _f.Frm = function(doctype, parent) {
|
|||
this.parent = parent;
|
||||
this.tinymce_id_list = [];
|
||||
|
||||
frms[doctype] = this;
|
||||
|
||||
this.setup_meta(doctype);
|
||||
|
||||
// notify on rename
|
||||
rename_observers.push(this);
|
||||
var me = this;
|
||||
$(document).bind('rename', function(event, dt, old_name, new_name) {
|
||||
if(dt==me.doctype)
|
||||
me.rename_notify(dt, old_name, new_name)
|
||||
});
|
||||
}
|
||||
|
||||
// ======================================================================================
|
||||
|
||||
_f.Frm.prototype.check_doctype_conflict = function(docname) {
|
||||
var me = this;
|
||||
if(this.doctype=='DocType' && docname=='DocType') {
|
||||
msgprint('Allowing DocType, DocType. Be careful!')
|
||||
} else if(this.doctype=='DocType') {
|
||||
if(wn.views.formview[docname]) {
|
||||
msgprint("Cannot open DocType when its instance is open")
|
||||
throw 'doctype open conflict'
|
||||
}
|
||||
} else {
|
||||
if(wn.views.formview.DocType && wn.views.formview.DocType.frm.opendocs[this.doctype]) {
|
||||
msgprint("Cannot open instance when its DocType is open")
|
||||
throw 'doctype open conflict'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_f.Frm.prototype.setup = function() {
|
||||
|
||||
var me = this;
|
||||
|
|
@ -105,7 +95,7 @@ _f.Frm.prototype.setup = function() {
|
|||
this.fields_dict = {};
|
||||
|
||||
// wrapper
|
||||
this.wrapper = $a(this.parent.body, 'div');
|
||||
this.wrapper = this.parent;
|
||||
|
||||
// create area for print fomrat
|
||||
this.setup_print_layout();
|
||||
|
|
@ -127,7 +117,10 @@ _f.Frm.prototype.setup = function() {
|
|||
_f.Frm.prototype.setup_print_layout = function() {
|
||||
this.print_wrapper = $a(this.wrapper, 'div');
|
||||
this.print_head = $a(this.print_wrapper, 'div');
|
||||
this.print_body = $a(this.print_wrapper,'div', 'layout_wrapper', {padding:'23px'});
|
||||
this.print_body = $a(this.print_wrapper,'div', 'layout_wrapper', {
|
||||
padding:'23px',
|
||||
minHeight: '800px'
|
||||
});
|
||||
|
||||
var t= make_table(this.print_head, 1 ,2, '100%', [], {padding: '6px'});
|
||||
this.view_btn_wrapper = $a($td(t,0,0) , 'span', 'green_buttons');
|
||||
|
|
@ -137,7 +130,7 @@ _f.Frm.prototype.setup_print_layout = function() {
|
|||
this.print_btn = $btn($td(t,0,0), 'Print', function() { cur_frm.print_doc() });
|
||||
|
||||
$y($td(t,0,1), {textAlign: 'right'});
|
||||
this.print_close_btn = $btn($td(t,0,1), 'Close', function() { nav_obj.show_last_open(); });
|
||||
this.print_close_btn = $btn($td(t,0,1), 'Close', function() { window.back(); });
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -148,8 +141,8 @@ _f.Frm.prototype.onhide = function() { if(_f.cur_grid_cell) _f.cur_grid_cell.gri
|
|||
_f.Frm.prototype.setup_std_layout = function() {
|
||||
this.page_layout = new wn.PageLayout({
|
||||
parent: this.wrapper,
|
||||
main_width: this.in_dialog ? '100%' : '75%',
|
||||
sidebar_width: this.in_dialog ? '0%' : '25%'
|
||||
main_width: this.meta.in_dialog ? '100%' : '75%',
|
||||
sidebar_width: this.meta.in_dialog ? '0%' : '25%'
|
||||
})
|
||||
|
||||
// only tray
|
||||
|
|
@ -159,7 +152,7 @@ _f.Frm.prototype.setup_std_layout = function() {
|
|||
this.layout = new Layout(this.page_layout.body, '100%');
|
||||
|
||||
// sidebar
|
||||
if(this.in_dialog) {
|
||||
if(this.meta.in_dialog) {
|
||||
// hide sidebar
|
||||
$(this.page_layout.wrapper).removeClass('layout-wrapper-background');
|
||||
$(this.page_layout.main).removeClass('layout-main-section');
|
||||
|
|
@ -184,23 +177,6 @@ _f.Frm.prototype.setup_std_layout = function() {
|
|||
|
||||
// create fields
|
||||
this.setup_fields_std();
|
||||
|
||||
// description
|
||||
if(this.meta.description)
|
||||
this.add_description();
|
||||
}
|
||||
|
||||
// ======================================================================================
|
||||
|
||||
_f.Frm.prototype.add_description = function() {
|
||||
if(!wn.md2html) {
|
||||
wn.require('lib/js/lib/showdown.js');
|
||||
wn.md2html = new Showdown.converter();
|
||||
}
|
||||
|
||||
this.description_wrapper = $a(this.page_layout.footer.help_area, 'div',
|
||||
'info-box', {marginTop:'10px'},
|
||||
wn.md2html.makeHtml('#### Help\n\n' + this.meta.description));
|
||||
}
|
||||
|
||||
_f.Frm.prototype.setup_print = function() {
|
||||
|
|
@ -262,13 +238,7 @@ _f.Frm.prototype.email_doc = function() {
|
|||
|
||||
// ======================================================================================
|
||||
|
||||
_f.Frm.prototype.rename_notify = function(dt, old, name) {
|
||||
if(this.doctype != dt) return;
|
||||
|
||||
// sections
|
||||
this.cur_section[name] = this.cur_section[old];
|
||||
delete this.cur_section[old];
|
||||
|
||||
_f.Frm.prototype.rename_notify = function(dt, old, name) {
|
||||
// editable
|
||||
this.is_editable[name] = this.is_editable[old];
|
||||
delete this.is_editable[old];
|
||||
|
|
@ -284,10 +254,11 @@ _f.Frm.prototype.rename_notify = function(dt, old, name) {
|
|||
local_dt[dt][name] = local_dt[dt][old];
|
||||
local_dt[dt][old] = null;
|
||||
}
|
||||
|
||||
this.opendocs[old] = false;
|
||||
|
||||
delete this.opendocs[old];
|
||||
this.opendocs[name] = true;
|
||||
}
|
||||
|
||||
// refresh the heading labels
|
||||
// ======================================================================================
|
||||
|
||||
|
|
@ -296,19 +267,6 @@ _f.Frm.prototype.set_heading = function() {
|
|||
}
|
||||
|
||||
|
||||
// PAGING
|
||||
// ======================================================================================
|
||||
|
||||
_f.Frm.prototype.set_section = function(sec_id) {
|
||||
if(!this.sections[sec_id] || !this.sections[sec_id].expand)
|
||||
return; // Simple type
|
||||
|
||||
if(this.sections[this.cur_section[this.docname]])
|
||||
this.sections[this.cur_section[this.docname]].collapse();
|
||||
this.sections[sec_id].expand();
|
||||
this.cur_section[this.docname] = sec_id;
|
||||
}
|
||||
|
||||
// SETUP
|
||||
// ======================================================================================
|
||||
|
||||
|
|
@ -316,6 +274,7 @@ _f.Frm.prototype.set_section = function(sec_id) {
|
|||
_f.Frm.prototype.setup_meta = function() {
|
||||
this.meta = get_local('DocType',this.doctype);
|
||||
this.perm = get_perm(this.doctype); // for create
|
||||
if(this.meta.istable) { this.meta.in_dialog = 1 }
|
||||
this.setup_print();
|
||||
}
|
||||
|
||||
|
|
@ -335,7 +294,7 @@ _f.Frm.prototype.setup_footer = function() {
|
|||
var f = this.page_layout.footer;
|
||||
|
||||
// save buttom
|
||||
f.save_area = $a(this.page_layout.footer,'div','',{display:'none'});
|
||||
f.save_area = $a(this.page_layout.footer,'div','',{display:'none', marginTop:'11px'});
|
||||
f.help_area = $a(this.page_layout.footer,'div');
|
||||
|
||||
var b = $btn(f.save_area, 'Save',
|
||||
|
|
@ -369,26 +328,28 @@ _f.Frm.prototype.setup_fields_std = function() {
|
|||
var sec;
|
||||
for(var i=0;i<fl.length;i++) {
|
||||
var f=fl[i];
|
||||
|
||||
// no section breaks in embedded forms
|
||||
if(get_url_arg('embed') && (in_list(['Section Break','Column Break'], f.fieldtype))) continue;
|
||||
|
||||
|
||||
// if section break and next item
|
||||
// is a section break then ignore
|
||||
if(f.fieldtype=='Section Break' && fl[i+1] && fl[i+1].fieldtype=='Section Break') continue;
|
||||
if(f.fieldtype=='Section Break' && fl[i+1] && fl[i+1].fieldtype=='Section Break')
|
||||
continue;
|
||||
|
||||
var fn = f.fieldname?f.fieldname:f.label;
|
||||
|
||||
var fld = make_field(f, this.doctype, this.layout.cur_cell, this);
|
||||
|
||||
this.fields[this.fields.length] = fld;
|
||||
this.fields_dict[fn] = fld;
|
||||
|
||||
// Add to section break so that this section can be shown when there is an error
|
||||
if(this.meta.section_style != 'Simple')
|
||||
if(sec && ['Section Break', 'Column Break'].indexOf(f.fieldtype)==-1) {
|
||||
fld.parent_section = sec;
|
||||
sec.fields.push(fld);
|
||||
}
|
||||
|
||||
if(f.fieldtype=='Section Break' && f.options != 'Simple')
|
||||
if(f.fieldtype=='Section Break') {
|
||||
sec = fld;
|
||||
this.sections.push(fld);
|
||||
}
|
||||
|
||||
// default col-break after sec-break
|
||||
if((f.fieldtype=='Section Break')&&(fl[i+1])&&(fl[i+1].fieldtype!='Column Break')&&!f.hidden) {
|
||||
|
|
@ -428,17 +389,6 @@ _f.Frm.prototype.setup_client_script = function() {
|
|||
|
||||
// --------------------------------------------------------------------------------------
|
||||
|
||||
// change the parent - deprecated
|
||||
_f.Frm.prototype.set_parent = function(parent) {
|
||||
if(parent) {
|
||||
this.parent = parent;
|
||||
if(this.wrapper && this.wrapper.parentNode != parent)
|
||||
parent.appendChild(this.wrapper);
|
||||
}
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
|
||||
_f.Frm.prototype.refresh_print_layout = function() {
|
||||
$ds(this.print_wrapper);
|
||||
$dh(this.page_layout.wrapper);
|
||||
|
|
@ -469,39 +419,16 @@ _f.Frm.prototype.refresh_print_layout = function() {
|
|||
}
|
||||
|
||||
|
||||
// SHOW!
|
||||
// ======================================================================================
|
||||
|
||||
_f.Frm.prototype.hide = function() {
|
||||
$dh(this.wrapper);
|
||||
this.display = 0;
|
||||
if(hide_autosuggest)
|
||||
hide_autosuggest();
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
|
||||
_f.Frm.prototype.show_the_frm = function() {
|
||||
// hide other (open) forms
|
||||
if(this.parent.last_displayed && this.parent.last_displayed != this) {
|
||||
this.parent.last_displayed.defocus_rest();
|
||||
this.parent.last_displayed.hide();
|
||||
}
|
||||
|
||||
// show the form
|
||||
if(this.wrapper && this.wrapper.style.display.toLowerCase()=='none') {
|
||||
$ds(this.wrapper);
|
||||
this.display = 1;
|
||||
}
|
||||
|
||||
// show the dialog
|
||||
if(this.meta.in_dialog && !this.parent.dialog.display) {
|
||||
if(!this.meta.istable)
|
||||
this.parent.table_form = false;
|
||||
this.parent.dialog.show();
|
||||
}
|
||||
|
||||
this.parent.last_displayed = this;
|
||||
}
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
|
|
@ -514,7 +441,6 @@ _f.Frm.prototype.set_print_heading = function(txt) {
|
|||
_f.Frm.prototype.defocus_rest = function() {
|
||||
// deselect others
|
||||
if(_f.cur_grid_cell) _f.cur_grid_cell.grid.cell_deselect();
|
||||
cur_page = null;
|
||||
}
|
||||
|
||||
// -------- Permissions -------
|
||||
|
|
@ -571,7 +497,7 @@ _f.Frm.prototype.check_doc_perm = function() {
|
|||
return 1;
|
||||
}
|
||||
}
|
||||
nav_obj.show_last_open();
|
||||
window.back();
|
||||
return 0;
|
||||
}
|
||||
return 1
|
||||
|
|
@ -637,11 +563,8 @@ _f.Frm.prototype.refresh = function(docname) {
|
|||
// trigger global trigger
|
||||
// to use this
|
||||
// $(docuemnt).bind('form_refresh', function() { })
|
||||
$(document).trigger('form_refresh')
|
||||
|
||||
// tabs
|
||||
this.refresh_tabs();
|
||||
|
||||
$(document).trigger('form_refresh');
|
||||
|
||||
// fields
|
||||
this.refresh_fields();
|
||||
|
||||
|
|
@ -655,8 +578,15 @@ _f.Frm.prototype.refresh = function(docname) {
|
|||
if(this.layout) this.layout.show();
|
||||
|
||||
// call onload post render for callbacks to be fired
|
||||
if(cur_frm.cscript.is_onload)
|
||||
this.runclientscript('onload_post_render', this.doctype, this.docname);
|
||||
if(cur_frm.cscript.is_onload) {
|
||||
this.runclientscript('onload_post_render', this.doctype, this.docname);
|
||||
}
|
||||
|
||||
// focus on first input
|
||||
|
||||
if(this.doc.docstatus==0) {
|
||||
$(this.wrapper).find('.form-layout-row :input:first').focus();
|
||||
}
|
||||
|
||||
} else {
|
||||
// show print layout
|
||||
|
|
@ -667,33 +597,13 @@ _f.Frm.prototype.refresh = function(docname) {
|
|||
}
|
||||
this.runclientscript('edit_status_changed');
|
||||
}
|
||||
|
||||
// show the record
|
||||
if(!this.display) this.show_the_frm();
|
||||
|
||||
// show the page
|
||||
if(!this.meta.in_dialog) page_body.change_to('Forms');
|
||||
|
||||
$(cur_frm.wrapper).trigger('render_complete');
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
|
||||
_f.Frm.prototype.refresh_tabs = function() {
|
||||
var me = this;
|
||||
if(me.meta.section_style=='Tray'||me.meta.section_style=='Tabbed') {
|
||||
for(var i in me.sections) {
|
||||
me.sections[i].collapse();
|
||||
}
|
||||
|
||||
me.set_section(me.cur_section[me.docname]);
|
||||
}
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
|
||||
_f.Frm.prototype.refresh_footer = function() {
|
||||
var f = this.page_layout.footer;
|
||||
if(f.save_area) {
|
||||
|
|
@ -708,14 +618,28 @@ _f.Frm.prototype.refresh_footer = function() {
|
|||
// --------------------------------------------------------------------------------------
|
||||
|
||||
_f.Frm.prototype.refresh_fields = function() {
|
||||
// set fields
|
||||
// refresh fields
|
||||
for(var i=0; i<this.fields.length; i++) {
|
||||
var f = this.fields[i];
|
||||
f.perm = this.perm;
|
||||
f.docname = this.docname;
|
||||
if(f.refresh)f.refresh();
|
||||
|
||||
// if field is identifiable (not blank section or column break)
|
||||
// get the "customizable" parameters for this record
|
||||
var fn = f.df.fieldname || f.df.label;
|
||||
if(fn)
|
||||
f.df = get_field(this.doctype, fn, this.docname);
|
||||
|
||||
if(f.df.fieldtype!='Section Break' && f.refresh) {
|
||||
f.refresh();
|
||||
}
|
||||
}
|
||||
|
||||
// refresh sections
|
||||
$.each(this.sections, function(i, f) {
|
||||
f.refresh(true);
|
||||
})
|
||||
|
||||
// cleanup activities after refresh
|
||||
this.cleanup_refresh(this);
|
||||
}
|
||||
|
|
@ -805,6 +729,7 @@ _f.Frm.prototype.refresh_dependency = function() {
|
|||
// ======================================================================================
|
||||
|
||||
_f.Frm.prototype.setnewdoc = function(docname) {
|
||||
this.check_doctype_conflict(docname);
|
||||
|
||||
// if loaded
|
||||
if(this.opendocs[docname]) { // already exists
|
||||
|
|
@ -831,9 +756,6 @@ _f.Frm.prototype.setnewdoc = function(docname) {
|
|||
this.is_editable[docname] = 1;
|
||||
if(this.meta.read_only_onload) this.is_editable[docname] = 0;
|
||||
|
||||
// Section Type
|
||||
if(this.meta.section_style=='Tray'||this.meta.section_style=='Tabbed') { this.cur_section[docname] = 0; }
|
||||
|
||||
this.opendocs[docname] = true;
|
||||
}
|
||||
|
||||
|
|
@ -898,6 +820,7 @@ _f.Frm.prototype.save = function(save_action, call_back) {
|
|||
|
||||
|
||||
var ret_fn = function(r) {
|
||||
me.savingflag = false;
|
||||
if(user=='Guest' && !r.exc) {
|
||||
// if user is guest, show a message after succesful saving
|
||||
$dh(me.page_layout.wrapper);
|
||||
|
|
@ -914,7 +837,6 @@ _f.Frm.prototype.save = function(save_action, call_back) {
|
|||
}
|
||||
|
||||
if(call_back){
|
||||
if(call_back == 'home'){ loadpage('_home'); return; }
|
||||
call_back(r);
|
||||
}
|
||||
}
|
||||
|
|
@ -1072,15 +994,11 @@ _f.Frm.prototype.copy_doc = function(onload, from_amend) {
|
|||
// ======================================================================================
|
||||
|
||||
_f.Frm.prototype.reload_doc = function() {
|
||||
var me = this;
|
||||
if(frms['DocType'] && frms['DocType'].opendocs[me.doctype]) {
|
||||
msgprint("error:Cannot refresh an instance of \"" + me.doctype+ "\" when the DocType is open.");
|
||||
return;
|
||||
}
|
||||
this.check_doctype_conflict(this.docname);
|
||||
|
||||
var me = this;
|
||||
var ret_fn = function(r, rtxt) {
|
||||
// n tweets and last comment
|
||||
|
||||
// n tweets and last comment
|
||||
me.runclientscript('setup', me.doctype, me.docname);
|
||||
me.refresh();
|
||||
}
|
||||
|
|
@ -1149,7 +1067,7 @@ _f.Frm.prototype.savetrash = function() {
|
|||
if(wn.ui.toolbar.recent) wn.ui.toolbar.recent.remove(me.doctype, me.docname);
|
||||
|
||||
// "close"
|
||||
nav_obj.show_last_open();
|
||||
window.back();
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
@ -1182,7 +1100,7 @@ _f.set_value = function(dt, dn, fn, v) {
|
|||
var d = locals[dt][dn];
|
||||
|
||||
if(!d) {
|
||||
errprint('error:Trying to set a value for "'+dt+','+dn+'" which is not found');
|
||||
console.log('_f.set_value - '+ fn+': "'+dt+','+dn+'" not found');
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -1192,11 +1110,11 @@ _f.set_value = function(dt, dn, fn, v) {
|
|||
if(changed) {
|
||||
d[fn] = v;
|
||||
d.__unsaved = 1;
|
||||
var frm = frms[d.doctype];
|
||||
var frm = wn.views.formview[d.doctype];
|
||||
try {
|
||||
if(d.parent && d.parenttype) {
|
||||
locals[d.parenttype][d.parent].__unsaved = 1;
|
||||
frm = frms[d.parenttype];
|
||||
frm = wn.views.formview[d.parenttype];
|
||||
}
|
||||
} catch(e) {
|
||||
if(d.parent && d.parenttype)
|
||||
|
|
|
|||
|
|
@ -116,6 +116,7 @@ CommentList.prototype.add_comment = function() {
|
|||
// --------------------
|
||||
CommentList.prototype.make_lst = function() {
|
||||
if(!this.lst) {
|
||||
wn.require('lib/js/legacy/widgets/listing.js');
|
||||
var l = new Listing('Comments', 1);
|
||||
var me = this;
|
||||
// define the columns etc
|
||||
|
|
@ -176,7 +177,7 @@ CommentItem = function(cell, ri, ci, d, comment) {
|
|||
// Set picture
|
||||
// -----------
|
||||
CommentItem.prototype.set_picture = function(d, ri){
|
||||
set_user_img(this.img, user)
|
||||
this.user.src = wn.user_info(d[ri][2]).image;
|
||||
this.cmt_by.innerHTML = d[ri][7] ? d[ri][7] : d[ri][2];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,20 +20,6 @@
|
|||
// OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
_f.FrmContainer = function() {
|
||||
this.wrapper = page_body.add_page("Forms", function() {}, function() { });
|
||||
this.last_displayed = null;
|
||||
|
||||
// create hidden
|
||||
$dh(this.wrapper);
|
||||
|
||||
this.body = $a(this.wrapper,'div','frm_container');
|
||||
|
||||
// make by twin
|
||||
_f.frm_dialog = new _f.FrmDialog();
|
||||
}
|
||||
|
||||
|
||||
// FrmDialog - twin of FrmContainer
|
||||
// =======================================================================
|
||||
_f.frm_dialog = null;
|
||||
|
|
@ -92,86 +78,51 @@ _f.FrmDialog = function() {
|
|||
// -------------------------------------------
|
||||
d.onhide = function() {
|
||||
// if called from grid, refresh the row
|
||||
if(_f.cur_grid)
|
||||
_f.cur_grid.refresh_row(_f.cur_grid_ridx, me.dn);
|
||||
if(_f.cur_grid) {
|
||||
_f.cur_grid.refresh_row(_f.cur_grid_ridx, me.dn);
|
||||
}
|
||||
|
||||
// set the new global cur_frm (if applicable)
|
||||
if(page_body.cur_page_label = 'Forms') {
|
||||
cur_frm = _f.frm_con.cur_frm;
|
||||
if(wn.container.page.frm) {
|
||||
cur_frm = wn.container.page.frm;
|
||||
}
|
||||
|
||||
// call onhide
|
||||
if(me.cur_frm.cscript.hide_dialog) {
|
||||
me.cur_frm.cscript.hide_dialog();
|
||||
}
|
||||
}
|
||||
this.dialog = d;
|
||||
}
|
||||
|
||||
// Form Factory
|
||||
// =======================================================================
|
||||
_f.add_frm = function(doctype, onload, opt_name, from_archive) {
|
||||
// dont open doctype and docname from the same session
|
||||
if(frms['DocType'] && frms['DocType'].opendocs[doctype]) {
|
||||
msgprint("error:Cannot create an instance of \"" + doctype+ "\" when the DocType is open.");
|
||||
return;
|
||||
}
|
||||
|
||||
// form already created, done
|
||||
if(frms[doctype]) {
|
||||
return frms[doctype];
|
||||
}
|
||||
|
||||
// Load Doctype from server
|
||||
var callback = function(r,rt) {
|
||||
|
||||
if(!locals['DocType'][doctype]) {
|
||||
if(r.exc) { msgprint("Did not load " + doctype, 1); }
|
||||
loadpage('_home');
|
||||
return;
|
||||
}
|
||||
|
||||
if(r.print_access) {
|
||||
if(!_f.temp_access[doctype])
|
||||
_f.temp_access[doctype] = {};
|
||||
_f.temp_access[doctype][opt_name] = 1;
|
||||
}
|
||||
|
||||
|
||||
// show fullpage or in Dialog?
|
||||
var meta = locals['DocType'][doctype];
|
||||
var in_dialog = false;
|
||||
|
||||
// if is table, its in the Dialog!
|
||||
if(meta.istable) meta.in_dialog = 1;
|
||||
|
||||
if(cint(meta.in_dialog)) {
|
||||
var parent = _f.frm_dialog;
|
||||
in_dialog = true;
|
||||
} else {
|
||||
var parent = _f.frm_con;
|
||||
}
|
||||
|
||||
// create the object
|
||||
var f = new _f.Frm(doctype, parent);
|
||||
f.in_dialog = in_dialog;
|
||||
|
||||
if(onload)onload(r,rt);
|
||||
// called from table edit
|
||||
_f.edit_record = function(dt, dn) {
|
||||
if(!_f.frm_dialog) {
|
||||
// make by twin
|
||||
_f.frm_dialog = new _f.FrmDialog();
|
||||
}
|
||||
var d = _f.frm_dialog;
|
||||
|
||||
// check if record is new (called from mapper etc)
|
||||
var is_new = 0;
|
||||
if(opt_name && locals[doctype] && locals[doctype][opt_name] && locals[doctype][opt_name].__islocal) {
|
||||
is_new = 1;
|
||||
}
|
||||
|
||||
if(opt_name && !is_new) {
|
||||
// get both
|
||||
var args = {'name':opt_name, 'doctype':doctype, 'getdoctype':1, 'user':user};
|
||||
|
||||
if(get_url_arg('akey')) args['akey'] = get_url_arg('akey');
|
||||
if(from_archive) args['from_archive'] = 1;
|
||||
|
||||
$c('webnotes.widgets.form.load.getdoc', args, callback);
|
||||
} else {
|
||||
// get doctype only
|
||||
$c('webnotes.widgets.form.load.getdoctype', args={'doctype':doctype}, callback);
|
||||
}
|
||||
}
|
||||
wn.model.with_doctype(dt, function() {
|
||||
wn.model.with_doc(dt, dn, function(dn) {
|
||||
// load
|
||||
if(!_f.frms[dt]) {
|
||||
_f.frms[dt] = new _f.Frm(dt, d.body);
|
||||
}
|
||||
var f = _f.frms[dt];
|
||||
if(f.meta.istable) {
|
||||
f.parent_doctype = cur_frm.doctype;
|
||||
f.parent_docname = cur_frm.docname;
|
||||
}
|
||||
|
||||
d.cur_frm = f;
|
||||
d.dn = dn;
|
||||
d.table_form = f.meta.istable;
|
||||
|
||||
// show the form
|
||||
f.refresh(dn);
|
||||
|
||||
d.dialog.show();
|
||||
})
|
||||
})
|
||||
}
|
||||
|
|
@ -29,7 +29,8 @@ _f.ColumnBreak = function() {
|
|||
}
|
||||
|
||||
_f.ColumnBreak.prototype.make_body = function() {
|
||||
if((!this.perm[this.df.permlevel]) || (!this.perm[this.df.permlevel][READ]) || this.df.hidden) {
|
||||
if((!this.perm[this.df.permlevel]) || (!this.perm[this.df.permlevel][READ]) ||
|
||||
this.df.hidden) {
|
||||
// no display
|
||||
return;
|
||||
}
|
||||
|
|
@ -49,162 +50,125 @@ _f.ColumnBreak.prototype.make_body = function() {
|
|||
_f.ColumnBreak.prototype.refresh = function(layout) {
|
||||
if(!this.cell)return; // no perm
|
||||
|
||||
var fn = this.df.fieldname?this.df.fieldname:this.df.label;
|
||||
if(fn) {
|
||||
this.df = get_field(this.doctype, fn, this.docname);
|
||||
|
||||
// hidden
|
||||
if(this.set_hidden!=this.df.hidden) {
|
||||
if(this.df.hidden)
|
||||
this.cell.hide();
|
||||
else
|
||||
this.cell.show();
|
||||
this.set_hidden = this.df.hidden;
|
||||
}
|
||||
// hidden
|
||||
if(this.set_hidden!=this.df.hidden) {
|
||||
if(this.df.hidden)
|
||||
this.cell.hide();
|
||||
else
|
||||
this.cell.show();
|
||||
this.set_hidden = this.df.hidden;
|
||||
}
|
||||
}
|
||||
|
||||
// ======================================================================================
|
||||
|
||||
_f.SectionBreak = function() {
|
||||
this.fields = [];
|
||||
this.set_input = function() { };
|
||||
}
|
||||
|
||||
_f.SectionBreak.prototype.make_row = function() {
|
||||
this.row = this.df.label ? this.frm.layout.addrow() : this.frm.layout.addsubrow();
|
||||
}
|
||||
|
||||
_f.SectionBreak.prototype.make_collapsible = function(head) {
|
||||
var me = this;
|
||||
|
||||
var div = $a(head,'div','',{paddingBottom: '3px', borderBottom:'1px solid #AAA'});
|
||||
if(cur_frm.meta.in_dialog) $y(div, {marginLeft:'8px'});
|
||||
|
||||
// checkbox
|
||||
this.chk = $a_input(div, 'checkbox',null,{marginRight:'8px'})
|
||||
|
||||
// label
|
||||
if(this.df.label) {
|
||||
this.label = $a(div, 'h3', '', {display:'inline'}, this.df.label);
|
||||
}
|
||||
|
||||
|
||||
// description
|
||||
var d = this.df.description;
|
||||
if(d) {
|
||||
this.desc_area = $a(div, 'span', 'field_description', {marginLeft:'8px'});
|
||||
this.desc_area.innerHTML = d.substr(0,50) + (d.length > 50 ? '...' : '');
|
||||
}
|
||||
|
||||
// back to top
|
||||
var span = $a(div, 'i', 'icon-arrow-up', {cssFloat:'right', marginRight:'8px',
|
||||
cursor:'pointer', verticalAlign:'middle', marginTop:'7px'})
|
||||
span.title = 'Go to top';
|
||||
span.onclick = function() { scroll(0, 0); }
|
||||
|
||||
// exp / collapse
|
||||
|
||||
this.chk.onclick = function() {
|
||||
if(this.checked) me.expand();
|
||||
else me.collapse();
|
||||
}
|
||||
|
||||
this.expand = function() {
|
||||
$(me.row.main_body).slideDown();
|
||||
}
|
||||
|
||||
this.collapse = function() {
|
||||
$(me.row.main_body).slideUp();
|
||||
}
|
||||
|
||||
// hide by default
|
||||
if(me.frm.section_count) {
|
||||
$dh(this.row.main_body);
|
||||
} else {
|
||||
this.chk.checked = true;
|
||||
this.make_row = function() {
|
||||
this.row = this.df.label ? this.frm.layout.addrow() : this.frm.layout.addsubrow();
|
||||
}
|
||||
}
|
||||
|
||||
// ======================================================================================
|
||||
|
||||
_f.SectionBreak.prototype.make_simple_section = function(with_header) {
|
||||
this.wrapper = $a(this.row.main_head, 'div', '', {margin:'8px 8px 0px 0px'});
|
||||
var me = this;
|
||||
|
||||
// colour
|
||||
if(this.df.colour) {
|
||||
var col = this.df.colour.split(':')[1];
|
||||
if(col!='FFF') {
|
||||
$y(this.row.sub_wrapper, { margin:'8px', padding: '0px' ,backgroundColor: ('#' + col)} );
|
||||
}
|
||||
}
|
||||
|
||||
if(with_header) {
|
||||
if(this.df.label && this.df.options!='Simple') {
|
||||
this.make_collapsible(this.wrapper);
|
||||
} else {
|
||||
// divider
|
||||
$y(this.wrapper, {paddingBottom:'4px'});
|
||||
if(this.df.label) {
|
||||
$a(this.wrapper, 'h3', '', {}, this.df.label);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// indent
|
||||
$y(this.row.body, { marginLeft:'17px' });
|
||||
|
||||
}
|
||||
|
||||
// ======================================================================================
|
||||
|
||||
_f.SectionBreak.prototype.add_to_sections = function() {
|
||||
this.sec_id = this.frm.sections.length;
|
||||
this.frm.sections[this.sec_id] = this;
|
||||
this.frm.sections_by_label[this.df.label] = this;
|
||||
}
|
||||
|
||||
_f.cur_sec_header = null;
|
||||
_f.SectionBreak.prototype.make_body = function() {
|
||||
var me = this;
|
||||
if((!this.perm[this.df.permlevel]) || (!this.perm[this.df.permlevel][READ]) || this.df.hidden) {
|
||||
// no display
|
||||
return;
|
||||
}
|
||||
var me = this;
|
||||
|
||||
if(this.df){
|
||||
this.make_row();
|
||||
this.make_simple_section(1, 1);
|
||||
}
|
||||
this.make_row();
|
||||
|
||||
if(this.df.label) {
|
||||
if(!this.df.description)
|
||||
this.df.description = '';
|
||||
$(this.row.main_head).html(repl('<div class="form-section-head" style="cursor: pointer">\
|
||||
<div class="head">%(label)s</h3>\
|
||||
<div class="help small">%(description)s</div>\
|
||||
</div>', this.df));
|
||||
|
||||
this.$expand = $(this.row.main_head).find('.head').click(function() {
|
||||
if($(me.row.main_head).find('h3').length) {
|
||||
me.section_collapse();
|
||||
} else {
|
||||
me.section_expand();
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
this.collapsible = true;
|
||||
} else {
|
||||
// simple
|
||||
$(this.wrapper).html('<div class="form-section-head"></div>');
|
||||
}
|
||||
|
||||
// collapse section
|
||||
this.section_collapse = function() {
|
||||
$(me.row.main_head).find('.head')
|
||||
.html('<i class="icon-chevron-right"></i> \
|
||||
<a href="#" onclick="return false;">Show "' + me.df.label + '"</a>');
|
||||
$(me.row.main_body).toggle(false);
|
||||
|
||||
}
|
||||
|
||||
// expand section
|
||||
this.section_expand = function(no_animation) {
|
||||
$(me.row.main_head).find('.head')
|
||||
.html('<h3><i class="icon-chevron-down" style="vertical-align: middle; margin-bottom: 2px"></i> '
|
||||
+ me.df.label + '</h3>');
|
||||
if(no_animation)
|
||||
$(me.row.main_body).toggle(true);
|
||||
else
|
||||
$(me.row.main_body).slideDown();
|
||||
}
|
||||
|
||||
// indent
|
||||
$y(this.row.body, { marginLeft:'17px' });
|
||||
}
|
||||
|
||||
|
||||
// ======================================================================================
|
||||
|
||||
_f.SectionBreak.prototype.refresh = function(layout) {
|
||||
var fn = this.df.fieldname?this.df.fieldname:this.df.label;
|
||||
|
||||
if(fn)
|
||||
this.df = get_field(this.doctype, fn, this.docname);
|
||||
|
||||
// hidden
|
||||
if(this.set_hidden!=this.df.hidden) {
|
||||
if(this.df.hidden) {
|
||||
if(this.frm.meta.section_style=='Tabbed') {
|
||||
$dh(this.mytab);
|
||||
} else if(this.tray_item)
|
||||
this.tray_item.hide();
|
||||
|
||||
if(this.row)this.row.hide();
|
||||
} else {
|
||||
if(this.frm.meta.section_style=='Tabbed') {
|
||||
$di(this.mytab);
|
||||
} else if(this.tray_item)
|
||||
this.tray_item.show();
|
||||
|
||||
if(this.expanded)this.row.show();
|
||||
_f.SectionBreak.prototype.has_data = function() {
|
||||
// return true if
|
||||
// 1. any field in the section is mandatory & not set as default
|
||||
// 2. any field in the section has data that is not default
|
||||
// 3. if table, table has rows
|
||||
|
||||
var me = this;
|
||||
for(var i in me.fields) {
|
||||
var f = me.fields[i];
|
||||
var v = f.get_value ? f.get_value() : null;
|
||||
|
||||
// value that is not default
|
||||
defaultval = f.df['default'] || sys_defaults[f.fieldname] || user_defaults[f.fieldname];
|
||||
if(v && v != defaultval) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// unfilled mandatory field
|
||||
if(f.df.reqd && !v) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// filled table
|
||||
if(f.df.fieldtype=='Table') {
|
||||
if(f.grid.get_children().length || f.df.reqd) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
_f.SectionBreak.prototype.refresh = function(from_form) {
|
||||
if(this.df.hidden) {
|
||||
if(this.row)this.row.hide();
|
||||
} else {
|
||||
if(this.collapsible) {
|
||||
if(this.df.reqd || this.has_data()) {
|
||||
this.section_expand(from_form);
|
||||
} else {
|
||||
this.section_collapse();
|
||||
}
|
||||
}
|
||||
this.set_hidden = this.df.hidden;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -228,7 +192,7 @@ _f.ImageField.prototype.get_image_src = function(doc) {
|
|||
var img_extn_list = ['gif', 'jpg', 'bmp', 'jpeg', 'jp2', 'cgm', 'ief', 'jpm', 'jpx', 'png', 'tiff', 'jpe', 'tif'];
|
||||
|
||||
if(in_list(img_extn_list, extn)) {
|
||||
var src = outUrl + "?cmd=downloadfile&file_id="+file[1];
|
||||
var src = wn.request.url + "?cmd=downloadfile&file_id="+file[1];
|
||||
}
|
||||
} else {
|
||||
var src = "";
|
||||
|
|
@ -248,7 +212,7 @@ _f.ImageField.prototype.onrefresh = function() {
|
|||
var doc = locals[this.frm.doctype][this.frm.docname];
|
||||
|
||||
if(!this.df.options) var src = this.get_image_src(doc);
|
||||
else var src = outUrl + '?cmd=get_file&fname='+this.df.options+"&__account="+account_id + (__sid150 ? ("&sid150="+__sid150) : '');
|
||||
else var src = wn.request.url + '?cmd=get_file&fname='+this.df.options+"&__account="+account_id + (__sid150 ? ("&sid150="+__sid150) : '');
|
||||
|
||||
|
||||
if(src) {
|
||||
|
|
@ -282,7 +246,7 @@ _f.TableField.prototype.make_body = function() {
|
|||
if(this.perm[this.df.permlevel] && this.perm[this.df.permlevel][READ]) {
|
||||
// add comment area
|
||||
if(this.df.description) {
|
||||
this.desc_area = $a(this.parent, 'div', 'field_description', '', this.df.description)
|
||||
this.desc_area = $a(this.parent, 'div', 'help small', '', this.df.description)
|
||||
}
|
||||
this.grid = new _f.FormGrid(this);
|
||||
if(this.frm)this.frm.grids[this.frm.grids.length] = this;
|
||||
|
|
@ -384,7 +348,7 @@ _f.CodeField.prototype.make_input = function() {
|
|||
// setup tiny mce
|
||||
$(me.input).tinymce({
|
||||
// Location of TinyMCE script
|
||||
script_url : 'lib/js/legacy/tiny_mce_33/tiny_mce.js',
|
||||
script_url : 'lib/js/lib/tiny_mce_33/tiny_mce.js',
|
||||
|
||||
// General options
|
||||
theme : "advanced",
|
||||
|
|
@ -403,7 +367,7 @@ _f.CodeField.prototype.make_input = function() {
|
|||
theme_advanced_toolbar_location : "top",
|
||||
theme_advanced_toolbar_align : "left",
|
||||
|
||||
content_css: "js/tiny_mce_33/custom_content.css",
|
||||
content_css: "lib/js/lib/tiny_mce_33/custom_content.css",
|
||||
|
||||
oninit: function() { me.init_editor(); }
|
||||
});
|
||||
|
|
|
|||
|
|
@ -115,8 +115,12 @@ _f.FormGrid.prototype.set_column_label = function(fieldname, label) {
|
|||
}
|
||||
}
|
||||
|
||||
_f.FormGrid.prototype.get_children = function() {
|
||||
return getchildren(this.doctype, this.field.frm.docname, this.field.df.fieldname, this.field.frm.doctype);
|
||||
}
|
||||
|
||||
_f.FormGrid.prototype.refresh = function() {
|
||||
var docset = getchildren(this.doctype, this.field.frm.docname, this.field.df.fieldname, this.field.frm.doctype);
|
||||
var docset = this.get_children();
|
||||
var data = [];
|
||||
|
||||
//alert(docset.length);
|
||||
|
|
|
|||
|
|
@ -34,13 +34,10 @@ _f.FrmHeader = function(parent, frm) {
|
|||
var div = $a(null, 'div', '', {marginBottom:'4px'});
|
||||
|
||||
this.page_head.lhs.insertBefore(div, this.page_head.sub_head);
|
||||
this.dn_area = $a(div, 'span', '', {fontSize:'14px', fontWeight:'normal', marginRight:'8px'})
|
||||
this.dn_area = $a(div, 'span', '', {fontSize:'14px', fontWeight:'normal', marginRight:'8px', padding: '2px'})
|
||||
|
||||
// status
|
||||
this.status_area = $a(div, 'span', '', {marginRight:'8px', marginBottom:'2px', cursor:'pointer', textShadow:'none'})
|
||||
|
||||
// timestamp
|
||||
this.timestamp_area = $a($a(div,'div','',{marginTop:'3px'}), 'span', 'field_description', {fontSize:'11px'});
|
||||
}
|
||||
_f.FrmHeader.prototype.show = function() { $ds(this.wrapper); }
|
||||
_f.FrmHeader.prototype.hide = function() { $dh(this.wrapper); }
|
||||
|
|
@ -60,36 +57,36 @@ _f.FrmHeader.prototype.refresh= function() {
|
|||
if(!cur_frm.editable)
|
||||
this.page_head.add_button('Edit', function() {
|
||||
cur_frm.edit_doc();
|
||||
}, 1, 'ui-icon-document', 1
|
||||
}, 1, 'icon-pencil', 1
|
||||
);
|
||||
else
|
||||
this.page_head.add_button('Print View', function() {
|
||||
cur_frm.is_editable[cur_frm.docname] = 0;
|
||||
cur_frm.refresh(); }, 1, 'ui-icon-document' );
|
||||
cur_frm.refresh(); }, 1, 'icon-print' );
|
||||
}
|
||||
|
||||
|
||||
// Save
|
||||
if(cur_frm.editable && cint(cur_frm.doc.docstatus)==0 && p[WRITE])
|
||||
this.page_head.add_button('Save', function() { cur_frm.save('Save');}, 1, 'ui-icon-disk',1);
|
||||
this.page_head.add_button('Save', function() { cur_frm.save('Save');}, 1, '',1);
|
||||
|
||||
// Submit
|
||||
if(cint(cur_frm.doc.docstatus)==0 && p[SUBMIT] && (!cur_frm.doc.__islocal))
|
||||
this.page_head.add_button('Submit', function() { cur_frm.savesubmit(); }, 0, 'ui-icon-locked');
|
||||
this.page_head.add_button('Submit', function() { cur_frm.savesubmit(); }, 0, 'icon-lock');
|
||||
|
||||
// Update after sumit
|
||||
if(cint(cur_frm.doc.docstatus)==1 && p[SUBMIT]) {
|
||||
this.update_btn = this.page_head.add_button('Update', function() { cur_frm.saveupdate(); }, 1, 'ui-icon-disk', 1);
|
||||
this.update_btn = this.page_head.add_button('Update', function() { cur_frm.saveupdate(); }, 1, 'icon-ok', 1);
|
||||
if(!cur_frm.doc.__unsaved) $dh(this.update_btn);
|
||||
}
|
||||
|
||||
// Cancel
|
||||
if(cint(cur_frm.doc.docstatus)==1 && p[CANCEL])
|
||||
this.page_head.add_button('Cancel', function() { cur_frm.savecancel() }, 0, 'ui-icon-closethick');
|
||||
this.page_head.add_button('Cancel', function() { cur_frm.savecancel() }, 0, 'icon-remove');
|
||||
|
||||
// Amend
|
||||
if(cint(cur_frm.doc.docstatus)==2 && p[AMEND])
|
||||
this.page_head.add_button('Amend', function() { cur_frm.amend_doc() }, 0, 'ui-icon-scissors');
|
||||
this.page_head.add_button('Amend', function() { cur_frm.amend_doc() }, 0, 'icon-pencil');
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -118,27 +115,6 @@ _f.FrmHeader.prototype.refresh_toolbar = function() {
|
|||
//this.refresh_comments();
|
||||
}
|
||||
|
||||
/*_f.FrmHeader.prototype.refresh_comments = function() {
|
||||
var n = cint(cur_frm.n_comments[cur_frm.doc.name]);
|
||||
if(this.comment_btn && !cur_frm.doc.__islocal)
|
||||
this.comment_btn.innerHTML = 'Comments ('+n+')';
|
||||
}*/
|
||||
|
||||
// refresh heading and labels
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
_f.FrmHeader.prototype.get_timestamp = function(doc) {
|
||||
var scrub_date = function(d) {
|
||||
if(d)t=d.split(' ');else return '';
|
||||
return dateutil.str_to_user(t[0]) + ' ' + t[1];
|
||||
}
|
||||
|
||||
return repl("Created: %(c_by)s %(c_on)s %(m_by)s %(m_on)s",
|
||||
{c_by:doc.owner
|
||||
,c_on:scrub_date(doc.creation ? doc.creation:'')
|
||||
,m_by:doc.modified_by?(' | Modified: '+doc.modified_by):''
|
||||
,m_on:doc.modified ? ('on '+scrub_date(doc.modified)) : ''} );
|
||||
}
|
||||
|
||||
// make the status tag
|
||||
// -------------------------------------------------------------------
|
||||
|
|
@ -198,11 +174,17 @@ _f.FrmHeader.prototype.set_save_submit_color = function(doc) {
|
|||
|
||||
if(cint(doc.docstatus)==0 && submit_btn && save_btn) {
|
||||
if(cint(doc.__unsaved)) {
|
||||
$(save_btn).addClass('btn-primary');
|
||||
$(submit_btn).removeClass('btn-primary');
|
||||
$(save_btn).addClass('btn-info');
|
||||
$(save_btn).find('i').addClass('icon-white');
|
||||
|
||||
$(submit_btn).removeClass('btn-info');
|
||||
$(submit_btn).find('i').removeClass('icon-white');
|
||||
} else {
|
||||
$(submit_btn).addClass('btn-primary');
|
||||
$(save_btn).removeClass('btn-primary');
|
||||
$(submit_btn).addClass('btn-info');
|
||||
$(submit_btn).find('i').addClass('icon-white');
|
||||
|
||||
$(save_btn).removeClass('btn-info');
|
||||
$(save_btn).find('i').removeClass('icon-white');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -217,10 +199,16 @@ _f.FrmHeader.prototype.refresh_labels = function(f) {
|
|||
// main title
|
||||
this.dt_area.innerHTML = get_doctype_label(f.doctype);
|
||||
|
||||
if(f.meta.issingle) $(this.dn_area).toggle(false);
|
||||
|
||||
// sub title
|
||||
this.dn_area.innerHTML = '';
|
||||
if(!f.meta.issingle)
|
||||
this.dn_area.innerHTML = f.docname;
|
||||
|
||||
$(this.dn_area)
|
||||
.removeClass('background-fade-in')
|
||||
.css('background-color', '#ff8')
|
||||
|
||||
// get the doc
|
||||
var doc = locals[f.doctype][f.docname];
|
||||
|
|
@ -237,6 +225,6 @@ _f.FrmHeader.prototype.refresh_labels = function(f) {
|
|||
t.appendChild(sl[0]);
|
||||
if(sl[1])t.appendChild(sl[1]);
|
||||
|
||||
// timestamp
|
||||
this.timestamp_area.innerHTML = me.get_timestamp(doc);
|
||||
setTimeout('$(cur_frm.frm_head.dn_area).addClass("background-fade-in")\
|
||||
.css("background-color", "white")', 1500)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -120,9 +120,11 @@ _f.Grid.prototype.insert_column = function(doctype, fieldname, fieldtype, label,
|
|||
|
||||
_f.Grid.prototype.reset_table_width = function() {
|
||||
var w = 0;
|
||||
for(var i=0, len=this.head_row.cells.length; i<len; i++) {
|
||||
w += cint(this.head_row.cells[i].style.width);
|
||||
}
|
||||
$.each(this.head_row.cells, function(i, cell) {
|
||||
if((cell.style.display || '').toLowerCase()!='none')
|
||||
w += cint(cell.style.width);
|
||||
})
|
||||
|
||||
this.head_tab.style.width = w + 'px';
|
||||
this.tab.style.width = w + 'px';
|
||||
}
|
||||
|
|
@ -263,15 +265,18 @@ $(document).bind('click', function(e) {
|
|||
}
|
||||
|
||||
var is_target_input = function() {
|
||||
if(e.target.tagName.toLowerCase()=='option') return true;
|
||||
|
||||
return $(e.target).parents().get().indexOf(_f.cur_grid_cell)!=-1;
|
||||
}
|
||||
|
||||
if(_f.cur_grid_cell && !is_target_input() && !is_target_toolbar()) {
|
||||
if(!(text_dialog && text_dialog.display)
|
||||
&& !datepicker_active && !(selector && selector.display) && !(cur_autosug)) {
|
||||
&& !datepicker_active && !(selector && selector.display)) {
|
||||
_f.cur_grid_cell.grid.cell_deselect();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
_f.Grid.prototype.cell_deselect = function() {
|
||||
|
|
@ -282,7 +287,6 @@ _f.Grid.prototype.cell_deselect = function() {
|
|||
if(c.is_odd) c.div.style.border = '2px solid ' + c.grid.alt_row_bg;
|
||||
else c.div.style.border = '2px solid #FFF';
|
||||
_f.cur_grid_cell = null;
|
||||
_f.cur_grid = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ Layout.prototype.close_borders = function() {
|
|||
|
||||
function LayoutRow(layout, parent) {
|
||||
this.layout = layout;
|
||||
this.wrapper = $a(parent,'div');
|
||||
this.wrapper = $a(parent,'div','form-layout-row');
|
||||
|
||||
// main head
|
||||
this.main_head = $a(this.wrapper, 'div');
|
||||
|
|
@ -122,7 +122,7 @@ function LayoutCell(layout, layoutRow, width) {
|
|||
|
||||
var h = $a(this.cell, 'div','',{padding:(layout.with_border ? '0px 8px' : '0px')});
|
||||
|
||||
this.wrapper = $a(this.cell, 'div','',{padding:(layout.with_border ? '8px' : '8px 0px')});
|
||||
this.wrapper = $a(this.cell, 'div','',{padding:(layout.with_border ? '8px' : '0px')});
|
||||
|
||||
layout.cur_cell = this.wrapper;
|
||||
layout.cur_cell.header = h;
|
||||
|
|
|
|||
|
|
@ -1,153 +0,0 @@
|
|||
// Copyright (c) 2012 Web Notes Technologies Pvt Ltd (http://erpnext.com)
|
||||
//
|
||||
// MIT License (MIT)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a
|
||||
// copy of this software and associated documentation files (the "Software"),
|
||||
// to deal in the Software without restriction, including without limitation
|
||||
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
// and/or sell copies of the Software, and to permit persons to whom the
|
||||
// Software is furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
||||
// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
||||
// CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
|
||||
// OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
ListSelector = function(title, intro, list, onupdate, selectable) {
|
||||
var me = this; this.list = list; this.selectable = selectable;
|
||||
|
||||
this.dialog = new Dialog(400,600,title);
|
||||
this.items = [];
|
||||
|
||||
// intro
|
||||
if(intro) {
|
||||
intro_area = $a(this.dialog.body, 'div', 'help_box', {margin:'16px', marginBottom:'0px', width:'312px'});
|
||||
intro_area.innerHTML = intro;
|
||||
}
|
||||
|
||||
// body
|
||||
this.body = $a(this.dialog.body, 'div', '', {margin:'16px', position: 'relative'});
|
||||
|
||||
// items
|
||||
this.render();
|
||||
|
||||
// ---------------------------------------
|
||||
|
||||
// update button
|
||||
var btn = $btn(this.dialog.body, 'Update', function() { me.update() }, {margin:'0px 0px 16px 16px'}, 'green', 1);
|
||||
this.update = function() {
|
||||
if(me.selected_item) $bg(me.selected_item, '#FFF');
|
||||
var ret = [];
|
||||
for(var i=0; i<me.items.length; i++) {
|
||||
// [label, idx, selected, det]
|
||||
ret.push([me.items[i].label, me.items[i].idx, (me.items[i].check ? (me.items[i].check.checked ? 1 : 0) : 0), me.items[i].det]);
|
||||
}
|
||||
|
||||
me.dialog.hide();
|
||||
|
||||
// call the user with (done!)
|
||||
onupdate(ret);
|
||||
}
|
||||
|
||||
this.dialog.show();
|
||||
}
|
||||
|
||||
// ---------------------------------------
|
||||
|
||||
ListSelector.prototype.render = function(to_hide) {
|
||||
this.body.innerHTML = ''; this.items = [];
|
||||
|
||||
// sort
|
||||
this.list.sort(function(a,b) { return a[1] > b[1]; });
|
||||
|
||||
// items
|
||||
for(i=0; i<this.list.length; i++) {
|
||||
// make checkbox for if selectable
|
||||
this.list[i][1]=i;
|
||||
this.items.push(new ListSelectorItem(this, this.list[i], i));
|
||||
if(i==to_hide) $dh(this.items[i].body);
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------------------------
|
||||
|
||||
ListSelector.prototype.insert_at = function(item, new_idx) {
|
||||
for(var i=0;i<this.list.length; i++) {
|
||||
if(this.list[i][1] >= new_idx) this.list[i][1]++;
|
||||
}
|
||||
for(var i=0;i<this.list.length; i++) {
|
||||
if(this.list[i][1] >= item.idx) this.list[i][1]--;
|
||||
}
|
||||
this.list[item.idx][1] = new_idx;
|
||||
|
||||
var n = new_idx - ((new_idx > item.idx) ? 1 : 0);
|
||||
this.render(n);
|
||||
this.items[n].body.onmousedown();
|
||||
$(this.items[n].body).slideDown();
|
||||
}
|
||||
|
||||
// =====================================
|
||||
|
||||
ListSelectorItem = function(ls, det, idx) {
|
||||
this.det = det; this.ls = ls; this.idx = idx;
|
||||
|
||||
this.body = $a(ls.body, 'div', '', {padding: '8px', margin:'4px 0px',
|
||||
border:'1px solid #AAA', position: 'relative', width:'320px', height:'14px', cursor:'move'});
|
||||
|
||||
if(ls.selectable) {
|
||||
// with checkbox
|
||||
this.make_with_checkbox();
|
||||
} else {
|
||||
// no checkbox (only label)
|
||||
this.body.innerHTML = det[0];
|
||||
}
|
||||
this.set_drag();
|
||||
}
|
||||
|
||||
// ---------------------------------------
|
||||
|
||||
ListSelectorItem.prototype.make_with_checkbox = function() {
|
||||
this.body.tab = make_table(this.body, 1, 2, null, ['28px',null], {verticalAlign:'top'});
|
||||
this.check = $a_input($td(this.body.tab, 0, 0), 'checkbox');
|
||||
if(this.det[2]) this.check.checked = 1;
|
||||
$td(this.body.tab, 0, 1).innerHTML = this.det[0];
|
||||
}
|
||||
|
||||
// ---------------------------------------
|
||||
|
||||
ListSelectorItem.prototype.set_drag = function() {
|
||||
var me = this;
|
||||
this.body.item = this;
|
||||
|
||||
// color on mousedown
|
||||
this.body.onmousedown = function() {
|
||||
$bg(this, '#FFC');
|
||||
if(me.ls.selected_item && me.ls.selected_item != this) $bg(me.ls.selected_item, '#FFF');
|
||||
me.ls.selected_item = this;
|
||||
}
|
||||
|
||||
// setup draggable
|
||||
$(this.body).draggable({
|
||||
opacity: 0.6,
|
||||
helper: 'clone',
|
||||
containment: 'parent',
|
||||
scroll: false,
|
||||
cursor: 'move',
|
||||
drag:function(event, ui){
|
||||
me.ls.drag_item = this.item;
|
||||
}
|
||||
});
|
||||
|
||||
$(this.body).droppable({
|
||||
drop: function(event, ui) {
|
||||
me.ls.insert_at(me.ls.drag_item, me.idx + (me.ls.drag_item.idx < me.idx ? 1 : 0));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
// Listing
|
||||
// this listing object will soon be
|
||||
// deprecated because it has a very non standard way of creation
|
||||
// the new listing object is at wn.widgets.Listing
|
||||
// the new listing object is at wn.ui.Listing
|
||||
// -----------------------
|
||||
|
||||
list_opts = {
|
||||
|
|
|
|||
|
|
@ -30,13 +30,10 @@ _r.ReportContainer = function() {
|
|||
msgprint("Not Allowed");
|
||||
return;
|
||||
}
|
||||
this.wrapper = page_body.add_page("Report Builder", function() { });
|
||||
this.wrapper.className ='layout_wrapper';
|
||||
this.wrapper = $a(wn.container.add_page("Report Builder"), 'div', 'layout-wrapper');
|
||||
var head_div = $a(this.wrapper, 'div');
|
||||
this.rb_area = $a(this.wrapper, 'div');
|
||||
|
||||
$dh(this.wrapper);
|
||||
|
||||
|
||||
var me = this;
|
||||
this.rb_dict = {};
|
||||
|
||||
|
|
@ -563,7 +560,7 @@ _r.ReportBuilder.prototype.validate_permissions = function(onload) {
|
|||
} else {
|
||||
msgprint('No Read Permission');
|
||||
}
|
||||
nav_obj.show_last_open();
|
||||
window.back();
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
|
|
|
|||
|
|
@ -1,37 +0,0 @@
|
|||
// Copyright (c) 2012 Web Notes Technologies Pvt Ltd (http://erpnext.com)
|
||||
//
|
||||
// MIT License (MIT)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a
|
||||
// copy of this software and associated documentation files (the "Software"),
|
||||
// to deal in the Software without restriction, including without limitation
|
||||
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
// and/or sell copies of the Software, and to permit persons to whom the
|
||||
// Software is furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
||||
// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
||||
// CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
|
||||
// OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
/* Only using native widget now - no longer want to support IE6 */
|
||||
|
||||
function SelectWidget(parent, options, width, editable, bg_color) {
|
||||
var me = this;
|
||||
// native select
|
||||
this.inp = $a(parent, 'select');
|
||||
if(options) add_sel_options(this.inp, options);
|
||||
if(width) $y(this.inp, {width:width});
|
||||
this.set_width = function(w) { $y(this.inp, {width:w}) };
|
||||
this.set_options = function(o) { add_sel_options(this.inp, o); }
|
||||
this.inp.onchange = function() {
|
||||
if(me.onchange)me.onchange(this);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
@ -57,13 +57,11 @@ TabbedPage.prototype.add_tab = function(n, onshow, no_body, with_heading) {
|
|||
|
||||
tab.collapse = function() {
|
||||
if(this.tab_body)$dh(this.tab_body); this.className = '';
|
||||
if(hide_autosuggest)
|
||||
hide_autosuggest();
|
||||
}
|
||||
tab.set_selected = function() {
|
||||
if(me.cur_tab) me.cur_tab.collapse();
|
||||
this.className = 'box_tab_selected';
|
||||
$op(this, 100);
|
||||
$(this).css('opacity', 1);
|
||||
me.cur_tab = this;
|
||||
}
|
||||
tab.expand = function(arg) {
|
||||
|
|
|
|||
|
|
@ -225,7 +225,11 @@ SingleTag.prototype.make_body = function(parent) {
|
|||
if(this.onclick) $y(this.body, {cursor:'pointer'});
|
||||
|
||||
// hover
|
||||
$(this.body).hover(function() { $op(this,60); } ,function() { $op(this,100); });
|
||||
$(this.body).hover(function() {
|
||||
$(this).css('opacity', 0.6);
|
||||
} ,function() {
|
||||
$(this).css('opacity', 1);
|
||||
});
|
||||
|
||||
// label
|
||||
this.make_label();
|
||||
|
|
|
|||
|
|
@ -79,8 +79,7 @@ wn.widgets.form.sidebar.AssignTo = Class.extend({
|
|||
{fieldtype:'Link', fieldname:'assign_to', options:'Profile',
|
||||
label:'Assign To',
|
||||
description:'Add to To Do List of', reqd:true},
|
||||
{fieldtype:'Data', fieldname:'description', label:'Comment',
|
||||
'default': 'Assigned by ' + user},
|
||||
{fieldtype:'Data', fieldname:'description', label:'Comment'},
|
||||
{fieldtype:'Date', fieldname:'date', label:'Complete By'},
|
||||
{fieldtype:'Select', fieldname:'priority', label:'Priority',
|
||||
options:'Low\nMedium\nHigh', 'default':'Medium'},
|
||||
|
|
|
|||
|
|
@ -33,7 +33,8 @@ wn.widgets.form.sidebar.Attachments = function(parent, sidebar, doctype, docname
|
|||
|
||||
// no attachments if file is unsaved
|
||||
if(this.frm.doc.__islocal) {
|
||||
this.attach_wrapper.innerHTML = 'Attachments can be uploaded after saving'
|
||||
this.attach_wrapper.innerHTML = '<div class="help">Attachments can be \
|
||||
uploaded after saving</div>';
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -114,7 +115,7 @@ wn.widgets.form.sidebar.Attachment = function(parent, filedet, frm) {
|
|||
var display_name = this.fileid;
|
||||
if(this.fileid.substr(0,8)=='FileData')
|
||||
display_name = this.filename;
|
||||
this.ln = $a(this.wrapper, 'a', 'link_type', {fontSize:'11px'}, display_name);
|
||||
this.ln = $a(this.wrapper, 'a', 'link_type small', {}, display_name);
|
||||
this.ln.href = 'files/'+this.fileid;
|
||||
this.ln.target = '_blank';
|
||||
|
||||
|
|
@ -156,7 +157,7 @@ wn.widgets.form.file_upload_done = function(doctype, docname, fileid, filename,
|
|||
doc.modified = new_timestamp;
|
||||
|
||||
// update file_list
|
||||
var frm = frms[doctype];
|
||||
var frm = wn.views.formview[doctype].frm;
|
||||
frm.attachments.dialog.hide();
|
||||
msgprint('File Uploaded Sucessfully.');
|
||||
frm.refresh();
|
||||
|
|
|
|||
|
|
@ -45,12 +45,13 @@ wn.widgets.form.sidebar.Comments = function(parent, sidebar, doctype, docname) {
|
|||
this.render_comments = function() {
|
||||
var f = wn.widgets.form.comments;
|
||||
var cl = f.comment_list[me.docname]
|
||||
this.msg = $a(this.wrapper, 'div', 'sidebar-comment-message');
|
||||
this.msg = $a(this.wrapper, 'div', 'help small');
|
||||
|
||||
if(cl) {
|
||||
this.msg.innerHTML = cl.length + ' out of ' + f.n_comments[me.docname] + ' comments';
|
||||
if(f.n_comments[me.docname] > cl.length) {
|
||||
this.msg.innerHTML += ' <span class="link_type" onclick="cur_frm.show_comments()">Show all</span>'
|
||||
this.msg.innerHTML += ' <span class="link_type" \
|
||||
onclick="cur_frm.show_comments()">Show all</span>'
|
||||
}
|
||||
for(var i=0; i< cl.length; i++) {
|
||||
this.render_one_comment(cl[i]);
|
||||
|
|
|
|||
|
|
@ -38,6 +38,16 @@ wn.widgets.form.sidebar = { Sidebar: function(form) {
|
|||
onclick: function() { new_doc(me.form.doctype) }
|
||||
},
|
||||
|
||||
{
|
||||
type: 'link',
|
||||
label: 'List',
|
||||
icon: 'icon-list',
|
||||
display: function() {
|
||||
return !me.form.meta.issingle;
|
||||
},
|
||||
onclick: function() { window.location.href="#!List/" + me.form.doctype }
|
||||
},
|
||||
|
||||
{
|
||||
type: 'link',
|
||||
label: 'Refresh',
|
||||
|
|
@ -124,6 +134,41 @@ wn.widgets.form.sidebar = { Sidebar: function(form) {
|
|||
function() { });
|
||||
},
|
||||
display: function() { return !me.form.doc.__islocal }
|
||||
},
|
||||
|
||||
{
|
||||
title: 'Users',
|
||||
render: function(wrapper) {
|
||||
var doc = cur_frm.doc;
|
||||
var scrub_date = function(d) {
|
||||
if(d)t=d.split(' ');else return '';
|
||||
return dateutil.str_to_user(t[0]) + ' ' + t[1];
|
||||
}
|
||||
|
||||
$(wrapper).html(repl('<p>Created:<br> <span class="avatar-small">\
|
||||
<img title="%(created_by)s" src="%(avatar_created)s" /></span> \
|
||||
<span class="help small">%(creation)s</span></p>\
|
||||
<p>Modified:<br> <span class="avatar-small">\
|
||||
<img title="%(modified_by)s" src="%(avatar_modified)s" /></span> \
|
||||
<span class="help small">%(modified)s</span></p>', {
|
||||
created_by: wn.user_info(doc.owner).fullname,
|
||||
avatar_created: wn.user_info(doc.owner).image,
|
||||
creation: scrub_date(doc.creation),
|
||||
modified_by: wn.user_info(doc.modified_by).fullname,
|
||||
avatar_modified: wn.user_info(doc.modified_by).image,
|
||||
modified: scrub_date(doc.modified)
|
||||
}));
|
||||
},
|
||||
display: function() { return !me.form.doc.__islocal }
|
||||
},
|
||||
|
||||
{
|
||||
title: 'Help',
|
||||
render: function(wrapper) {
|
||||
$(wrapper).html('<div class="help small">'
|
||||
+ wn.markdown(me.form.meta.description) + '</div>')
|
||||
},
|
||||
display: function() { return me.form.meta.description }
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ wn.widgets.PageSidebarSection = function(sidebar, opts) {
|
|||
var item = this.opts.items[i];
|
||||
if((item.display && item.display()) || !item.display) {
|
||||
|
||||
var div = $a(this.body, 'div', 'section-item');
|
||||
var div = $a(this.body, 'div', 'section-item small');
|
||||
this.make_one_item(item, div);
|
||||
}
|
||||
|
||||
|
|
@ -131,7 +131,7 @@ wn.widgets.PageSidebarLink = function(section, opts, wrapper) {
|
|||
if(opts.icon) {
|
||||
section.add_icon(this.wrapper, opts.icon);
|
||||
}
|
||||
this.ln = $a(this.wrapper, 'span', 'link_type section-link', opts.style, opts.label);
|
||||
this.ln = $a(this.wrapper, 'span', 'link_type section-link small', opts.style, opts.label);
|
||||
this.ln.onclick = function() { me.opts.onclick(me) };
|
||||
}
|
||||
|
||||
|
|
|
|||
16
js/lib/history/history.min.js
vendored
|
|
@ -8,19 +8,3 @@
|
|||
*/
|
||||
(function($,e,b){var c="hashchange",h=document,f,g=$.event.special,i=h.documentMode,d="on"+c in e&&(i===b||i>7);function a(j){j=j||location.href;return"#"+j.replace(/^[^#]*#?(.*)$/,"$1")}$.fn[c]=function(j){return j?this.bind(c,j):this.trigger(c)};$.fn[c].delay=50;g[c]=$.extend(g[c],{setup:function(){if(d){return false}$(f.start)},teardown:function(){if(d){return false}$(f.stop)}});f=(function(){var j={},p,m=a(),k=function(q){return q},l=k,o=k;j.start=function(){p||n()};j.stop=function(){p&&clearTimeout(p);p=b};function n(){var r=a(),q=o(m);if(r!==m){l(m=r,q);$(e).trigger(c)}else{if(q!==m){location.href=location.href.replace(/#.*/,"")+q}}p=setTimeout(n,$.fn[c].delay)}$.browser.msie&&!d&&(function(){var q,r;j.start=function(){if(!q){r=$.fn[c].src;r=r&&r+a();q=$('<iframe tabindex="-1" title="empty"/>').hide().one("load",function(){r||l(a());n()}).attr("src",r||"javascript:0").insertAfter("body")[0].contentWindow;h.onpropertychange=function(){try{if(event.propertyName==="title"){q.document.title=h.title}}catch(s){}}}};j.stop=k;o=function(){return a(q.location.href)};l=function(v,s){var u=q.document,t=$.fn[c].domain;if(v!==s){u.title=h.title;u.open();t&&u.write('<script>document.domain="'+t+'"<\/script>');u.close();q.location.hash=v}}})();return j})()})(jQuery,this);
|
||||
|
||||
// manage history
|
||||
// load pages via ajax
|
||||
// setup the history adapter
|
||||
// if settings no_history is set, no history will be bound
|
||||
// this can be used to make it work with legacy
|
||||
|
||||
$(document).bind('ready', function() {
|
||||
// standard page openener
|
||||
$(window).bind('hashchange', function() {
|
||||
if(wn.settings.no_history)
|
||||
return;
|
||||
|
||||
// load the state on the browser
|
||||
wn.page.set(location.hash);
|
||||
});
|
||||
})
|
||||
|
|
|
|||