Browse Source

moved to boostrap 2.0

version-14
Rushabh Mehta 13 years ago
parent
commit
3d7dd69b27
16 changed files with 599 additions and 205 deletions
  1. +336
    -153
      css/bootstrap/buttons.css
  2. +170
    -1
      css/bootstrap/navbar.css
  3. +1
    -1
      js/legacy/utils/dom.js
  4. +3
    -2
      js/legacy/utils/msgprint.js
  5. +1
    -1
      js/legacy/webpage/page_header.js
  6. +1
    -1
      js/legacy/widgets/dialog.js
  7. +4
    -4
      js/legacy/widgets/form/form_header.js
  8. +4
    -2
      js/legacy/wn/widgets/form/assign_to.js
  9. +1
    -1
      js/wn/ui/button.js
  10. +1
    -1
      js/wn/ui/dialog.js
  11. +18
    -12
      js/wn/ui/toolbar.min.js
  12. +4
    -3
      js/wn/ui/toolbar/recent.js
  13. +16
    -18
      js/wn/ui/toolbar/toolbar.js
  14. +4
    -3
      py/core/doctype/doclayer/doclayer.js
  15. +1
    -1
      py/core/page/login_page/login_page.js
  16. +34
    -1
      py/webnotes/widgets/form/assign_to.py

+ 336
- 153
css/bootstrap/buttons.css View File

@@ -1,90 +1,37 @@
.btn.danger,
.alert-message.danger,
.btn.danger:hover,
.alert-message.danger:hover,
.btn.error,
.alert-message.error,
.btn.error:hover,
.alert-message.error:hover,
.btn.success,
.alert-message.success,
.btn.success:hover,
.alert-message.success:hover,
.btn.info,
.alert-message.info,
.btn.info:hover,
.alert-message.info:hover {
color: #ffffff;
}
.btn .close, .alert-message .close {
font-family: Arial, sans-serif;
.close {
float: right;
font-size: 20px;
font-weight: bold;
line-height: 18px;
color: #000000;
text-shadow: 0 1px 0 #ffffff;
opacity: 0.2;
filter: alpha(opacity=20);
}
.btn.danger,
.alert-message.danger,
.btn.error,
.alert-message.error {
background-color: #c43c35;
background-repeat: repeat-x;
background-image: -khtml-gradient(linear, left top, left bottom, from(#ee5f5b), to(#c43c35));
background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35);
background-image: -ms-linear-gradient(top, #ee5f5b, #c43c35);
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ee5f5b), color-stop(100%, #c43c35));
background-image: -webkit-linear-gradient(top, #ee5f5b, #c43c35);
background-image: -o-linear-gradient(top, #ee5f5b, #c43c35);
background-image: linear-gradient(top, #ee5f5b, #c43c35);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#c43c35', GradientType=0);
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
border-color: #c43c35 #c43c35 #882a25;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
}
.btn.success, .alert-message.success {
background-color: #57a957;
background-repeat: repeat-x;
background-image: -khtml-gradient(linear, left top, left bottom, from(#62c462), to(#57a957));
background-image: -moz-linear-gradient(top, #62c462, #57a957);
background-image: -ms-linear-gradient(top, #62c462, #57a957);
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #62c462), color-stop(100%, #57a957));
background-image: -webkit-linear-gradient(top, #62c462, #57a957);
background-image: -o-linear-gradient(top, #62c462, #57a957);
background-image: linear-gradient(top, #62c462, #57a957);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462', endColorstr='#57a957', GradientType=0);
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
border-color: #57a957 #57a957 #3d773d;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
}
.btn.info, .alert-message.info {
background-color: #339bb9;
background-repeat: repeat-x;
background-image: -khtml-gradient(linear, left top, left bottom, from(#5bc0de), to(#339bb9));
background-image: -moz-linear-gradient(top, #5bc0de, #339bb9);
background-image: -ms-linear-gradient(top, #5bc0de, #339bb9);
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #5bc0de), color-stop(100%, #339bb9));
background-image: -webkit-linear-gradient(top, #5bc0de, #339bb9);
background-image: -o-linear-gradient(top, #5bc0de, #339bb9);
background-image: linear-gradient(top, #5bc0de, #339bb9);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#5bc0de', endColorstr='#339bb9', GradientType=0);
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
border-color: #339bb9 #339bb9 #22697d;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
.close:hover {
color: #000000;
text-decoration: none;
opacity: 0.4;
filter: alpha(opacity=40);
cursor: pointer;
}
.btn {
cursor: pointer;
display: inline-block;
background-color: #e6e6e6;
background-repeat: no-repeat;
padding: 4px 10px 4px;
font-size: 13px;
line-height: 18px;
color: #333333;
text-align: center;
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
background-color: #fafafa;
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(25%, #ffffff), to(#e6e6e6));
background-image: -webkit-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
background-image: -moz-linear-gradient(top, #ffffff, #ffffff 25%, #e6e6e6);
background-image: -ms-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
background-image: -o-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
background-image: linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
background-repeat: no-repeat;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0);
padding: 5px 14px 6px;
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
color: #333;
font-size: 11px;
line-height: normal;
border: 1px solid #ccc;
border-bottom-color: #bbb;
-webkit-border-radius: 4px;
@@ -93,108 +40,344 @@
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
-moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
-webkit-transition: 0.1s linear all;
-moz-transition: 0.1s linear all;
-ms-transition: 0.1s linear all;
-o-transition: 0.1s linear all;
transition: 0.1s linear all;
cursor: pointer;
*margin-left: .3em;
}
.btn:first-child {
*margin-left: 0;
}
.btn:hover {
background-position: 0 -15px;
color: #333;
color: #333333;
text-decoration: none;
background-color: #e6e6e6;
background-position: 0 -15px;
-webkit-transition: background-position 0.1s linear;
-moz-transition: background-position 0.1s linear;
-ms-transition: background-position 0.1s linear;
-o-transition: background-position 0.1s linear;
transition: background-position 0.1s linear;
}
.btn:focus {
outline: 1px dotted #666;
outline: thin dotted;
outline: 5px auto -webkit-focus-ring-color;
outline-offset: -2px;
}
.btn.primary {
color: #ffffff;
background-color: #0064cd;
background-repeat: repeat-x;
background-image: -khtml-gradient(linear, left top, left bottom, from(#049cdb), to(#0064cd));
background-image: -moz-linear-gradient(top, #049cdb, #0064cd);
background-image: -ms-linear-gradient(top, #049cdb, #0064cd);
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #049cdb), color-stop(100%, #0064cd));
background-image: -webkit-linear-gradient(top, #049cdb, #0064cd);
background-image: -o-linear-gradient(top, #049cdb, #0064cd);
background-image: linear-gradient(top, #049cdb, #0064cd);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#049cdb', endColorstr='#0064cd', GradientType=0);
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
border-color: #0064cd #0064cd #003f81;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
}
.btn.active, .btn :active {
-webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);
-moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);
}
.btn.disabled {
cursor: default;
.btn.active, .btn:active {
background-image: none;
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
filter: alpha(opacity=65);
-khtml-opacity: 0.65;
-moz-opacity: 0.65;
opacity: 0.65;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
-webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
-moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
background-color: #e6e6e6;
background-color: #d9d9d9 \9;
color: rgba(0, 0, 0, 0.5);
outline: 0;
}
.btn[disabled] {
.btn.disabled, .btn[disabled] {
cursor: default;
background-image: none;
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
filter: alpha(opacity=65);
-khtml-opacity: 0.65;
-moz-opacity: 0.65;
background-color: #e6e6e6;
opacity: 0.65;
filter: alpha(opacity=65);
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
}
.btn.large {
.btn-large {
padding: 9px 14px;
font-size: 15px;
line-height: normal;
padding: 9px 14px 9px;
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
border-radius: 6px;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
.btn.small {
padding: 5px 7px 5px;
.btn-large .icon {
margin-top: 1px;
}
.btn-small {
padding: 5px 9px;
font-size: 11px;
line-height: 16px;
}
.btn-small .icon {
margin-top: -1px;
}
.btn-primary,
.btn-primary:hover,
.btn-warning,
.btn-warning:hover,
.btn-danger,
.btn-danger:hover,
.btn-success,
.btn-success:hover,
.btn-info,
.btn-info:hover {
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
color: #ffffff;
}
.btn-primary.active,
.btn-warning.active,
.btn-danger.active,
.btn-success.active,
.btn-info.active {
color: rgba(255, 255, 255, 0.75);
}
.btn-primary {
background-color: #006dcc;
background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
background-image: -ms-linear-gradient(top, #0088cc, #0044cc);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
background-image: -o-linear-gradient(top, #0088cc, #0044cc);
background-image: linear-gradient(top, #0088cc, #0044cc);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0);
border-color: #0044cc #0044cc #002a80;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
}
:root .alert-message, :root .btn {
border-radius: 0 \0;
.btn-primary:hover,
.btn-primary:active,
.btn-primary.active,
.btn-primary.disabled,
.btn-primary[disabled] {
background-color: #0044cc;
}
button.btn::-moz-focus-inner, input[type=submit].btn::-moz-focus-inner {
.btn-primary:active, .btn-primary.active {
background-color: #003399 \9;
}
.btn-warning {
background-color: #faa732;
background-image: -moz-linear-gradient(top, #fbb450, #f89406);
background-image: -ms-linear-gradient(top, #fbb450, #f89406);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));
background-image: -webkit-linear-gradient(top, #fbb450, #f89406);
background-image: -o-linear-gradient(top, #fbb450, #f89406);
background-image: linear-gradient(top, #fbb450, #f89406);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fbb450', endColorstr='#f89406', GradientType=0);
border-color: #f89406 #f89406 #ad6704;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
}
.btn-warning:hover,
.btn-warning:active,
.btn-warning.active,
.btn-warning.disabled,
.btn-warning[disabled] {
background-color: #f89406;
}
.btn-warning:active, .btn-warning.active {
background-color: #c67605 \9;
}
.btn-danger {
background-color: #da4f49;
background-image: -moz-linear-gradient(top, #ee5f5b, #bd362f);
background-image: -ms-linear-gradient(top, #ee5f5b, #bd362f);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f));
background-image: -webkit-linear-gradient(top, #ee5f5b, #bd362f);
background-image: -o-linear-gradient(top, #ee5f5b, #bd362f);
background-image: linear-gradient(top, #ee5f5b, #bd362f);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#bd362f', GradientType=0);
border-color: #bd362f #bd362f #802420;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
}
.btn-danger:hover,
.btn-danger:active,
.btn-danger.active,
.btn-danger.disabled,
.btn-danger[disabled] {
background-color: #bd362f;
}
.btn-danger:active, .btn-danger.active {
background-color: #942a25 \9;
}
.btn-success {
background-color: #5bb75b;
background-image: -moz-linear-gradient(top, #62c462, #51a351);
background-image: -ms-linear-gradient(top, #62c462, #51a351);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351));
background-image: -webkit-linear-gradient(top, #62c462, #51a351);
background-image: -o-linear-gradient(top, #62c462, #51a351);
background-image: linear-gradient(top, #62c462, #51a351);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462', endColorstr='#51a351', GradientType=0);
border-color: #51a351 #51a351 #387038;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
}
.btn-success:hover,
.btn-success:active,
.btn-success.active,
.btn-success.disabled,
.btn-success[disabled] {
background-color: #51a351;
}
.btn-success:active, .btn-success.active {
background-color: #408140 \9;
}
.btn-info {
background-color: #49afcd;
background-image: -moz-linear-gradient(top, #5bc0de, #2f96b4);
background-image: -ms-linear-gradient(top, #5bc0de, #2f96b4);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4));
background-image: -webkit-linear-gradient(top, #5bc0de, #2f96b4);
background-image: -o-linear-gradient(top, #5bc0de, #2f96b4);
background-image: linear-gradient(top, #5bc0de, #2f96b4);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#5bc0de', endColorstr='#2f96b4', GradientType=0);
border-color: #2f96b4 #2f96b4 #1f6377;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
}
.btn-info:hover,
.btn-info:active,
.btn-info.active,
.btn-info.disabled,
.btn-info[disabled] {
background-color: #2f96b4;
}
.btn-info:active, .btn-info.active {
background-color: #24748c \9;
}
button.btn, input[type="submit"].btn {
*padding-top: 2px;
*padding-bottom: 2px;
}
button.btn::-moz-focus-inner, input[type="submit"].btn::-moz-focus-inner {
padding: 0;
border: 0;
}
button.btn.large, input[type="submit"].btn.large {
*padding-top: 7px;
*padding-bottom: 7px;
}
button.btn.small, input[type="submit"].btn.small {
*padding-top: 3px;
*padding-bottom: 3px;
}
.btn-group {
position: relative;
*zoom: 1;
*margin-left: .3em;
}
.btn-group:before, .btn-group:after {
display: table;
content: "";
}
.btn-group:after {
clear: both;
}
.btn-group:first-child {
*margin-left: 0;
}
.btn-group + .btn-group {
margin-left: 5px;
}
.btn-toolbar {
margin-top: 9px;
margin-bottom: 9px;
}
.btn-toolbar .btn-group {
display: inline-block;
*display: inline;
/* IE7 inline-block hack */

/* CLose */

.close {
float: right;
color: #000000;
font-size: 15px;
font-weight: bold;
line-height: 13.5px;
margin-bottom: -2px;
text-shadow: 0 1px 0 #ffffff;
filter: alpha(opacity=25);
-khtml-opacity: 0.25;
-moz-opacity: 0.25;
opacity: 0.25;
text-decoration: none;
*zoom: 1;
}
.close:hover {
color: #000000;
text-decoration: none;
filter: alpha(opacity=40);
-khtml-opacity: 0.4;
-moz-opacity: 0.4;
opacity: 0.4;
cursor: pointer;
font-weight: bold;
.btn-group .btn {
position: relative;
float: left;
margin-left: -1px;
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
}
.btn-group .btn:first-child {
margin-left: 0;
-webkit-border-top-left-radius: 4px;
-moz-border-radius-topleft: 4px;
border-top-left-radius: 4px;
-webkit-border-bottom-left-radius: 4px;
-moz-border-radius-bottomleft: 4px;
border-bottom-left-radius: 4px;
}
.btn-group .btn:last-child, .btn-group .dropdown-toggle {
-webkit-border-top-right-radius: 4px;
-moz-border-radius-topright: 4px;
border-top-right-radius: 4px;
-webkit-border-bottom-right-radius: 4px;
-moz-border-radius-bottomright: 4px;
border-bottom-right-radius: 4px;
}
.btn-group .btn.large:first-child {
margin-left: 0;
-webkit-border-top-left-radius: 6px;
-moz-border-radius-topleft: 6px;
border-top-left-radius: 6px;
-webkit-border-bottom-left-radius: 6px;
-moz-border-radius-bottomleft: 6px;
border-bottom-left-radius: 6px;
}
.btn-group .btn.large:last-child, .btn-group .large.dropdown-toggle {
-webkit-border-top-right-radius: 6px;
-moz-border-radius-topright: 6px;
border-top-right-radius: 6px;
-webkit-border-bottom-right-radius: 6px;
-moz-border-radius-bottomright: 6px;
border-bottom-right-radius: 6px;
}
.btn-group .btn:hover,
.btn-group .btn:focus,
.btn-group .btn:active,
.btn-group .btn.active {
z-index: 2;
}
.btn-group .dropdown-toggle:active, .btn-group.open .dropdown-toggle {
outline: 0;
}
.btn-group .dropdown-toggle {
padding-left: 8px;
padding-right: 8px;
-webkit-box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
-moz-box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
*padding-top: 5px;
*padding-bottom: 5px;
}
.btn-group.open {
*z-index: 1000;
}
.btn-group.open .dropdown-menu {
display: block;
margin-top: 1px;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
.btn-group.open .dropdown-toggle {
background-image: none;
-webkit-box-shadow: inset 0 1px 6px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
-moz-box-shadow: inset 0 1px 6px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
box-shadow: inset 0 1px 6px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
}
.btn .caret {
margin-top: 7px;
margin-left: 0;
}
.btn:hover .caret, .open.btn-group .caret {
opacity: 1;
filter: alpha(opacity=100);
}
.btn-primary .caret,
.btn-danger .caret,
.btn-info .caret,
.btn-success .caret {
border-top-color: #ffffff;
opacity: 0.75;
filter: alpha(opacity=75);
}
.btn-small .caret {
margin-top: 4px;
}

+ 170
- 1
css/bootstrap/navbar.css View File

@@ -1,3 +1,173 @@
.nav {
margin-left: 0;
margin-bottom: 18px;
list-style: none;
}
.nav > li > a {
display: block;
}
.nav > li > a:hover {
text-decoration: none;
background-color: #eeeeee;
}
.nav-list {
padding-left: 14px;
padding-right: 14px;
margin-bottom: 0;
}
.nav-list > li > a, .nav-list .nav-header {
display: block;
padding: 3px 15px;
margin-left: -15px;
margin-right: -15px;
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}
.nav-list .nav-header {
font-size: 11px;
font-weight: bold;
line-height: 18px;
color: #999999;
text-transform: uppercase;
}
.nav-list > li + .nav-header {
margin-top: 9px;
}
.nav-list .active > a, .nav-list .active > a:hover {
color: #ffffff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
background-color: #0088cc;
}
.nav-list [class^="icon-"] {
margin-right: 2px;
}
.nav-tabs, .nav-pills {
*zoom: 1;
}
.nav-tabs:before,
.nav-pills:before,
.nav-tabs:after,
.nav-pills:after {
display: table;
content: "";
}
.nav-tabs:after, .nav-pills:after {
clear: both;
}
.nav-tabs > li, .nav-pills > li {
float: left;
}
.nav-tabs > li > a, .nav-pills > li > a {
padding-right: 12px;
padding-left: 12px;
margin-right: 2px;
line-height: 14px;
}
.nav-tabs {
border-bottom: 1px solid #ddd;
}
.nav-tabs > li {
margin-bottom: -1px;
}
.nav-tabs > li > a {
padding-top: 9px;
padding-bottom: 9px;
border: 1px solid transparent;
-webkit-border-radius: 4px 4px 0 0;
-moz-border-radius: 4px 4px 0 0;
border-radius: 4px 4px 0 0;
}
.nav-tabs > li > a:hover {
border-color: #eeeeee #eeeeee #dddddd;
}
.nav-tabs > .active > a, .nav-tabs > .active > a:hover {
color: #555555;
background-color: #ffffff;
border: 1px solid #ddd;
border-bottom-color: transparent;
cursor: default;
}
.nav-pills > li > a {
padding-top: 8px;
padding-bottom: 8px;
margin-top: 2px;
margin-bottom: 2px;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
.nav-pills .active > a, .nav-pills .active > a:hover {
color: #ffffff;
background-color: #0088cc;
}
.nav-stacked > li {
float: none;
}
.nav-stacked > li > a {
margin-right: 0;
}
.nav-tabs.nav-stacked {
border-bottom: 0;
}
.nav-tabs.nav-stacked > li > a {
border: 1px solid #ddd;
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
}
.nav-tabs.nav-stacked > li:first-child > a {
-webkit-border-radius: 4px 4px 0 0;
-moz-border-radius: 4px 4px 0 0;
border-radius: 4px 4px 0 0;
}
.nav-tabs.nav-stacked > li:last-child > a {
-webkit-border-radius: 0 0 4px 4px;
-moz-border-radius: 0 0 4px 4px;
border-radius: 0 0 4px 4px;
}
.nav-tabs.nav-stacked > li > a:hover {
border-color: #ddd;
z-index: 2;
}
.nav-pills.nav-stacked > li > a {
margin-bottom: 3px;
}
.nav-pills.nav-stacked > li:last-child > a {
margin-bottom: 1px;
}
.nav-tabs .dropdown-menu, .nav-pills .dropdown-menu {
margin-top: 1px;
border-width: 1px;
}
.nav-pills .dropdown-menu {
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}
.nav-tabs .dropdown-toggle .caret, .nav-pills .dropdown-toggle .caret {
border-top-color: #0088cc;
margin-top: 6px;
}
.nav-tabs .dropdown-toggle:hover .caret, .nav-pills .dropdown-toggle:hover .caret {
border-top-color: #005580;
}
.nav-tabs .active .dropdown-toggle .caret, .nav-pills .active .dropdown-toggle .caret {
border-top-color: #333333;
}
.nav > .dropdown.active > a:hover {
color: #000000;
cursor: pointer;
}
.nav-tabs .open .dropdown-toggle, .nav-pills .open .dropdown-toggle, .nav > .open.active > a:hover {
color: #ffffff;
background-color: #999999;
border-color: #999999;
}
.nav .open .caret, .nav .open.active .caret, .nav .open a:hover .caret {
border-top-color: #ffffff;
opacity: 1;
filter: alpha(opacity=100);
}

.navbar {
overflow: visible;
margin-bottom: 18px;
@@ -78,7 +248,6 @@
float: left;
display: block;
padding: 8px 20px 12px;
margin-left: -20px;
font-size: 20px;
font-weight: 200;
line-height: 1;


+ 1
- 1
js/legacy/utils/dom.js View File

@@ -73,7 +73,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='primary';
if(css_class==='green') css_class='btn-primary';
return new wn.ui.Button(
{parent:parent, label:label, onclick:onclick, style:style, is_ajax: is_ajax, css_class: css_class}
).btn;


+ 3
- 2
js/legacy/utils/msgprint.js View File

@@ -59,7 +59,7 @@ function msgprint(msg, issmall, callback) {

// Floating Message
var growl_area;
function show_alert(txt) {
function show_alert(txt, id) {
if(!growl_area) {
growl_area = $a(popup_cont, 'div', '', {position:'fixed', bottom:'8px', right:'8px', width: '320px', zIndex:10});
}
@@ -74,5 +74,6 @@ function show_alert(txt) {
// text
var t = $a(body, 'div', '', { color:'#FFF' });
$(t).html(txt);
if(id) { $(t).attr('id', id); }
$(wrapper).hide().fadeIn(1000);
}
}

+ 1
- 1
js/legacy/webpage/page_header.js View File

@@ -51,7 +51,7 @@ 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 ? 'primary' : ''));
var btn = $btn(tb,label,fn,{marginRight:'4px'}, (green ? 'btn-primary' : ''));
if(bold) $y(btn,{fontWeight:'bold'});

this.buttons[label]=btn;


+ 1
- 1
js/legacy/widgets/dialog.js View File

@@ -112,7 +112,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('primary');
$(b).addClass('btn-primary');
this.first_button = true;
}
if(d[2]) {


+ 4
- 4
js/legacy/widgets/form/form_header.js View File

@@ -176,11 +176,11 @@ _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('primary');
$(submit_btn).removeClass('primary');
$(save_btn).addClass('btn-primary');
$(submit_btn).removeClass('btn-primary');
} else {
$(submit_btn).addClass('primary');
$(save_btn).removeClass('primary');
$(submit_btn).addClass('btn-primary');
$(save_btn).removeClass('btn-primary');
}
}
}


+ 4
- 2
js/legacy/wn/widgets/form/assign_to.js View File

@@ -61,7 +61,8 @@ wn.widgets.form.sidebar.AssignTo = Class.extend({
'default': 'Assigned by ' + user},
{fieldtype:'Date', fieldname:'date', label:'Complete By'},
{fieldtype:'Select', fieldname:'priority', label:'Priority',
options:'Low\nMedium\nHigh', 'default':'Medium'},
options:'Low\nMedium\nHigh', 'default':'Medium'},
{fieldtype:'Check', fieldname:'notify', label:'Notify By Email'},
{fieldtype:'Button', label:'Add', fieldname:'add_btn'}
]
});
@@ -75,7 +76,8 @@ wn.widgets.form.sidebar.AssignTo = Class.extend({
assign_to: assign_to,
description: me.dialog.fields_dict.description.get_value(),
priority: me.dialog.fields_dict.priority.get_value(),
date: me.dialog.fields_dict.date.get_value()
date: me.dialog.fields_dict.date.get_value(),
notify: me.dialog.fields_dict.notify.get_value()
}, function(r,rt) {me.render(r.message);});
}
}


+ 1
- 1
js/wn/ui/button.js View File

@@ -2,7 +2,7 @@ wn.ui.Button = function(args) {
var me = this;
$.extend(this, {
make: function() {
me.btn = wn.dom.add(args.parent, 'button', 'btn small ' + (args.css_class || ''));
me.btn = wn.dom.add(args.parent, 'button', 'btn btn-small ' + (args.css_class || ''));
me.btn.args = args;

// ajax loading


+ 1
- 1
js/wn/ui/dialog.js View File

@@ -15,7 +15,7 @@ wn.widgets.FieldGroup = function() {
// first button primary ?
if(df.fieldtype=='Button' && !this.first_button) {
$(f.input).addClass('primary');
$(f.input).addClass('btn-primary');
this.first_button = true;
}
}


+ 18
- 12
js/wn/ui/toolbar.min.js View File

@@ -20,12 +20,13 @@ wn.ui.toolbar.Report=wn.ui.toolbar.SelectorDialog.extend({init:function(){this._
/*
* lib/js/wn/ui/toolbar/recent.js
*/
wn.ui.toolbar.RecentDocs=Class.extend({init:function(){$('.topbar .nav:first').append('<li class="dropdown">\
<a class="dropdown-toggle" href="#" onclick="return false;">Recent</a>\
wn.ui.toolbar.RecentDocs=Class.extend({init:function(){$('.navbar .nav:first').append('<li class="dropdown">\
<a class="dropdown-toggle" data-toggle="dropdown" href="#" \
onclick="return false;">Recent<b class="caret"></b></a>\
<ul class="dropdown-menu" id="toolbar-recent"></ul>\
</li>');this.setup();this.bind_events();},bind_events:function(){rename_observers.push(this);},rename_notify:function(dt,old,name){this.remove(dt,old);this.add(dt,name,1);},add:function(dt,dn,on_top){if(this.istable(dt))return;this.remove(dt,dn);var html=repl('<li data-docref="%(dt)s/%(dn)s">\
<a href="#Form/%(dt)s/%(dn)s">\
<span class="help">%(dt)s:</span> %(dn)s\
%(dn)s <span style="font-size: 10px">(%(dt)s)</span>\
</a></li>',{dt:dt,dn:dn});if(on_top){$('#toolbar-recent').prepend(html);}else{$('#toolbar-recent').append(html);}},istable:function(dt){return locals.DocType[dt]&&locals.DocType[dt].istable||false;},remove:function(dt,dn){$(repl('#toolbar-recent li[data-docref="%(dt)s/%(dn)s"]',{dt:dt,dn:dn})).remove();},setup:function(){try{var rlist=JSON.parse(profile.recent);}
catch(e){return;}
var m=rlist.length;if(m>15)m=15;for(var i=0;i<m;i++){var rd=rlist[i]
@@ -33,17 +34,17 @@ if(rd[1]){var dt=rd[0];var dn=rd[1];this.add(dt,dn,0);}}}});
/*
* lib/js/wn/ui/toolbar/toolbar.js
*/
wn.ui.toolbar.Toolbar=Class.extend({init:function(){this.make();this.make_home();this.make_new();this.make_search();this.make_report();wn.ui.toolbar.recent=new wn.ui.toolbar.RecentDocs();if(in_list(user_roles,'Administrator'))
this.make_options();this.make_tools();this.set_user_name();this.make_logout();$('.navbar').dropdown();$(document).trigger('toolbar_setup');},make:function(){$('header').append('<div class="navbar navbar-fixed-top">\
wn.ui.toolbar.Toolbar=Class.extend({init:function(){this.make();this.make_home();this.make_document();wn.ui.toolbar.recent=new wn.ui.toolbar.RecentDocs();if(in_list(user_roles,'Administrator'))
this.make_options();this.make_tools();this.set_user_name();this.make_logout();$('.dropdown-toggle').dropdown();$(document).trigger('toolbar_setup');},make:function(){$('header').append('<div class="navbar navbar-fixed-top">\
<div class="navbar-inner">\
<div class="container">\
<a class="brand"></a>\
<ul class="nav">\
</ul>\
<img src="lib/images/ui/spinner.gif" id="spinner"/>\
<ul class="nav secondary-nav">\
<ul class="nav pull-right">\
<li class="dropdown">\
<a class="dropdown-toggle" data-toggle="dropdown" href="#" <b class="caret"></b>\
<a class="dropdown-toggle" data-toggle="dropdown" href="#" \
onclick="return false;" id="toolbar-user-link"></a>\
<ul class="dropdown-menu" id="toolbar-user">\
</ul>\
@@ -51,10 +52,15 @@ this.make_options();this.make_tools();this.set_user_name();this.make_logout();$(
</ul>\
</div>\
</div>\
</div>');},make_home:function(){$('.navbar .nav:first').append('<li><a href="#'+home_page+'">Home</a></li>')},make_new:function(){wn.ui.toolbar.new_dialog=new wn.ui.toolbar.NewDialog();$('.navbar .nav:first').append('<li><a href="#" \
onclick="return wn.ui.toolbar.new_dialog.show();">New</a></li>');},make_search:function(){wn.ui.toolbar.search=new wn.ui.toolbar.Search();$('.navbar .nav:first').append('<li><a href="#" \
onclick="return wn.ui.toolbar.search.show();">Search</a></li>');},make_report:function(){wn.ui.toolbar.report=new wn.ui.toolbar.Report();$('.navbar .nav:first').append('<li><a href="#" \
onclick="return wn.ui.toolbar.report.show();">Report</a></li>');},make_tools:function(){$('.navbar .nav:first').append('<li class="dropdown">\
</div>');},make_home:function(){$('.navbar .nav:first').append('<li><a href="#'+home_page+'">Home</a></li>')},make_document:function(){wn.ui.toolbar.new_dialog=new wn.ui.toolbar.NewDialog();wn.ui.toolbar.search=new wn.ui.toolbar.Search();wn.ui.toolbar.report=new wn.ui.toolbar.Report();$('.navbar .nav:first').append('<li class="dropdown">\
<a class="dropdown-toggle" href="#" data-toggle="dropdown"\
onclick="return false;">Document<b class="caret"></b></a>\
<ul class="dropdown-menu" id="toolbar-document">\
<li><a href="#" onclick="return wn.ui.toolbar.new_dialog.show();">New</a></li>\
<li><a href="#" onclick="return wn.ui.toolbar.search.show();">Search</a></li>\
<li><a href="#" onclick="return wn.ui.toolbar.report.show();">Report</a></li>\
</ul>\
</li>');},make_tools:function(){$('.navbar .nav:first').append('<li class="dropdown">\
<a class="dropdown-toggle" data-toggle="dropdown" href="#" \
onclick="return false;">Tools<b class="caret"></b></a>\
<ul class="dropdown-menu" id="toolbar-tools">\
@@ -70,7 +76,7 @@ this.make_options();this.make_tools();this.set_user_name();this.make_logout();$(
<ul class="dropdown-menu" id="toolbar-options">\
</ul>\
</li>');profile.start_items.sort(function(a,b){return(a[4]-b[4])});for(var i=0;i<profile.start_items.length;i++){var d=profile.start_items[i];var ispage=d[0]=='Page';$('#toolbar-options').append(repl('<li><a href="#%(type)s%(dt)s%(dn)s">\
%(dn)s</a></li>',{type:(ispage?'':'Form/'),dt:(ispage?'':(d[0]+'/')),dn:d[5]||d[1]}));}},set_user_name:function(){var fn=user_fullname;if(fn.length>15)fn=fn.substr(0,12)+'...';$('#toolbar-user-link').html(fn);},make_logout:function(){$('#toolbar-user').append('<li><a href="#" onclick="return logout();">Logout</a></li>');}});wn.ui.toolbar.clear_cache=function(){localStorage&&localStorage.clear();$c('webnotes.session_cache.clear',{},function(r,rt){show_alert(r.message);});return false;}
%(dn)s</a></li>',{type:(ispage?'':'Form/'),dt:(ispage?'':(d[0]+'/')),dn:d[5]||d[1]}));}},set_user_name:function(){var fn=user_fullname;if(fn.length>15)fn=fn.substr(0,12)+'...';$('#toolbar-user-link').html(fn+'<b class="caret"></b>');},make_logout:function(){$('#toolbar-user').append('<li><a href="#" onclick="return logout();">Logout</a></li>');}});wn.ui.toolbar.clear_cache=function(){localStorage&&localStorage.clear();$c('webnotes.session_cache.clear',{},function(r,rt){show_alert(r.message);});return false;}
wn.ui.toolbar.download_backup=function(){$c('webnotes.utils.backups.get_backup',{},function(r,rt){});return false;}
wn.ui.toolbar.show_about=function(){try{wn.require('lib/js/wn/misc/about.js');wn.ui.misc.about();}catch(e){console.log(e);}
return false;}

+ 4
- 3
js/wn/ui/toolbar/recent.js View File

@@ -1,8 +1,9 @@
// recent document list
wn.ui.toolbar.RecentDocs = Class.extend({
init:function() {
$('.topbar .nav:first').append('<li class="dropdown">\
<a class="dropdown-toggle" href="#" onclick="return false;">Recent</a>\
$('.navbar .nav:first').append('<li class="dropdown">\
<a class="dropdown-toggle" data-toggle="dropdown" href="#" \
onclick="return false;">Recent<b class="caret"></b></a>\
<ul class="dropdown-menu" id="toolbar-recent"></ul>\
</li>');
this.setup();
@@ -21,7 +22,7 @@ wn.ui.toolbar.RecentDocs = Class.extend({
this.remove(dt, dn);
var html = repl('<li data-docref="%(dt)s/%(dn)s">\
<a href="#Form/%(dt)s/%(dn)s">\
<span class="help">%(dt)s:</span> %(dn)s\
%(dn)s <span style="font-size: 10px">(%(dt)s)</span>\
</a></li>',
{dt:dt, dn:dn});
if(on_top) {


+ 16
- 18
js/wn/ui/toolbar/toolbar.js View File

@@ -3,17 +3,14 @@ wn.ui.toolbar.Toolbar = Class.extend({
init: function() {
this.make();
this.make_home();
this.make_new();
this.make_search();
this.make_report();
this.make_document();
wn.ui.toolbar.recent = new wn.ui.toolbar.RecentDocs();
if(in_list(user_roles, 'Administrator'))
this.make_options();
this.make_tools();
this.set_user_name();
this.make_logout();
$('.navbar').dropdown();
$('.dropdown-toggle').dropdown();
$(document).trigger('toolbar_setup');
},
@@ -25,7 +22,7 @@ wn.ui.toolbar.Toolbar = Class.extend({
<ul class="nav">\
</ul>\
<img src="lib/images/ui/spinner.gif" id="spinner"/>\
<ul class="nav secondary-nav">\
<ul class="nav pull-right">\
<li class="dropdown">\
<a class="dropdown-toggle" data-toggle="dropdown" href="#" \
onclick="return false;" id="toolbar-user-link"></a>\
@@ -40,21 +37,22 @@ wn.ui.toolbar.Toolbar = Class.extend({
make_home: function() {
$('.navbar .nav:first').append('<li><a href="#'+home_page+'">Home</a></li>')
},
make_new: function() {

make_document: function() {
wn.ui.toolbar.new_dialog = new wn.ui.toolbar.NewDialog();
$('.navbar .nav:first').append('<li><a href="#" \
onclick="return wn.ui.toolbar.new_dialog.show();">New</a></li>');
},
make_search: function() {
wn.ui.toolbar.search = new wn.ui.toolbar.Search();
$('.navbar .nav:first').append('<li><a href="#" \
onclick="return wn.ui.toolbar.search.show();">Search</a></li>');
},
make_report: function() {
wn.ui.toolbar.report = new wn.ui.toolbar.Report();
$('.navbar .nav:first').append('<li><a href="#" \
onclick="return wn.ui.toolbar.report.show();">Report</a></li>');
$('.navbar .nav:first').append('<li class="dropdown">\
<a class="dropdown-toggle" href="#" data-toggle="dropdown"\
onclick="return false;">Document<b class="caret"></b></a>\
<ul class="dropdown-menu" id="toolbar-document">\
<li><a href="#" onclick="return wn.ui.toolbar.new_dialog.show();">New</a></li>\
<li><a href="#" onclick="return wn.ui.toolbar.search.show();">Search</a></li>\
<li><a href="#" onclick="return wn.ui.toolbar.report.show();">Report</a></li>\
</ul>\
</li>');
},

make_tools: function() {
$('.navbar .nav:first').append('<li class="dropdown">\
<a class="dropdown-toggle" data-toggle="dropdown" href="#" \
@@ -97,7 +95,7 @@ wn.ui.toolbar.Toolbar = Class.extend({
set_user_name: function() {
var fn = user_fullname;
if(fn.length > 15) fn = fn.substr(0,12) + '...';
$('#toolbar-user-link').html(fn);
$('#toolbar-user-link').html(fn + '<b class="caret"></b>');
},

make_logout: function() {


+ 4
- 3
py/core/doctype/doclayer/doclayer.js View File

@@ -31,8 +31,7 @@ cur_frm.cscript.refresh = function(doc, dt, dn) {
});
}
},1);
$(cur_frm.frm_head.page_head.buttons.Update).addClass('primary');
$(cur_frm.frm_head.page_head.buttons.Update).addClass('cupid-green');
$(cur_frm.frm_head.page_head.buttons.Update).addClass('btn-primary');
cur_frm.add_custom_button('Refresh Form', function() {
cur_frm.cscript.doc_type(doc, dt, dn);
@@ -63,7 +62,9 @@ cur_frm.load_doclabel_options = function(doc, dt, dn) {

cur_frm.refresh_doctype_select = function(doc, dt, dn) {
var doc_type = cur_frm.fields_dict['doc_type'];
doc_type.refresh_options(cur_frm.doctype_list);
if(doc_type) {
doc_type.refresh_options(cur_frm.doctype_list);
}
if(doc.doc_type) {
doc_type.set_input(doc.doc_type);
} else {


+ 1
- 1
py/core/page/login_page/login_page.js View File

@@ -3,7 +3,7 @@ pscript['onload_Login Page'] = function(){
$bs(lw, '1px 1px 3px #888');
pscript.login_btn = $btn('login_btn', 'Login', pscript.doLogin);
$(pscript.login_btn).addClass('primary');
$(pscript.login_btn).addClass('btn-primary');
$('#password').keypress(function(ev){
if(ev.which==13 && $('#password').val())


+ 34
- 1
py/webnotes/widgets/form/assign_to.py View File

@@ -28,7 +28,11 @@ def add():
d.description = webnotes.form_dict['description']
d.priority = webnotes.form_dict.get('priority', 'Medium')
d.date = webnotes.form_dict.get('date', nowdate())
d.assigned_by = webnotes.user.name
d.save(1)

# notify
notify_assignment(d.assigned_by, d.owner, d.reference_type, d.reference_name, action='ASSIGN', notify=webnotes.form_dict.get('notify'))
# update feeed
try:
@@ -45,8 +49,37 @@ def add():
@webnotes.whitelist()
def remove():
"""remove from todo"""
res = webnotes.conn.sql("""\
select assigned_by, owner, reference_type, reference_name from `tabToDo Item`
where reference_type=%(doctype)s and reference_name=%(name)s
and owner=%(assign_to)s""", webnotes.form_dict)

webnotes.conn.sql("""delete from `tabToDo Item`
where reference_type=%(doctype)s and reference_name=%(name)s
and owner=%(assign_to)s""", webnotes.form_dict)

if res and res[0]: notify_assignment(res[0][0], res[0][1], res[0][2], res[0][3])

return get()


def notify_assignment(assigned_by, owner, doc_type, doc_name, action='CLOSE', notify=0):
"""
Notify assignee that there is a change in assignment
"""
if not (assigned_by and owner and doc_type and doc_name): return
# Search for email address in description -- i.e. assignee
assignment = """<a href="#!Form/%s/%s">%s</a>""" % (doc_type, doc_name, doc_name)
if action=='CLOSE':
arg = {
'uid': assigned_by,
'comment': "The task %s, assigned to %s, has been closed by %s" % (assignment, owner, webnotes.user.name)
}
else:
arg = {
'uid': owner,
'comment': "A new task, %s, has been assigned to you by %s" % (assignment, webnotes.user.name),
'notify': notify
}
from home.page.my_company import my_company
my_company.post_comment(arg)

Loading…
Cancel
Save