diff --git a/core/doctype/control_panel/control_panel.txt b/core/doctype/control_panel/control_panel.txt
index eb7d0f5b49..604ef99465 100644
--- a/core/doctype/control_panel/control_panel.txt
+++ b/core/doctype/control_panel/control_panel.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:01",
"docstatus": 0,
- "modified": "2013-01-22 14:19:55",
+ "modified": "2013-11-03 11:04:45",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -135,7 +135,7 @@
"label": "Mail Server"
},
{
- "description": "Enter Email Id to receive Error Report sent by users.\nE.g.: support@iwebnotes.com",
+ "description": "Email Id where users will send support request e.g. support@example.com",
"doctype": "DocField",
"fieldname": "support_email_id",
"fieldtype": "Data",
diff --git a/core/doctype/custom_field/custom_field.py b/core/doctype/custom_field/custom_field.py
index d8025fed72..5099123d4f 100644
--- a/core/doctype/custom_field/custom_field.py
+++ b/core/doctype/custom_field/custom_field.py
@@ -104,3 +104,19 @@ def get_fields_label(dt=None, form=1):
field_list = [cstr(d.fieldname) for d in docfields]
return idx_label_list, field_list
+def delete_and_create_custom_field_if_values_exist(doctype, df):
+ df = webnotes._dict(df)
+ if webnotes.conn.sql("""select count(*) from `tab{doctype}`
+ where ifnull({fieldname},'')!=''""".format(doctype=doctype, fieldname=df.fieldname))[0][0]:
+
+ webnotes.bean({
+ "doctype":"Custom Field",
+ "dt": doctype,
+ "permlevel": df.permlevel or 0,
+ "label": df.label,
+ "fieldname": df.fieldname,
+ "fieldtype": df.fieldtype,
+ "options": df.options,
+ "insert_after": df.insert_after
+ }).insert()
+
\ No newline at end of file
diff --git a/core/doctype/customize_form/customize_form.txt b/core/doctype/customize_form/customize_form.txt
index ca9a6419b1..1fb21e36fc 100644
--- a/core/doctype/customize_form/customize_form.txt
+++ b/core/doctype/customize_form/customize_form.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-01-29 17:54:08",
"docstatus": 0,
- "modified": "2013-07-05 14:34:41",
+ "modified": "2013-11-03 11:06:11",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -86,15 +86,6 @@
"fieldname": "column_break1",
"fieldtype": "Column Break"
},
- {
- "description": "Load Print View on opening of an existing form",
- "doctype": "DocField",
- "fieldname": "read_only_onload",
- "fieldtype": "Check",
- "label": "Show Print First",
- "no_copy": 0,
- "search_index": 0
- },
{
"doctype": "DocField",
"fieldname": "allow_print",
diff --git a/core/doctype/doctype/doctype.txt b/core/doctype/doctype/doctype.txt
index 3a1022b14b..4063f13254 100644
--- a/core/doctype/doctype/doctype.txt
+++ b/core/doctype/doctype/doctype.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-02-18 13:36:19",
"docstatus": 0,
- "modified": "2013-10-14 17:09:57",
+ "modified": "2013-11-02 23:01:10",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -12,6 +12,7 @@
"allow_email": 0,
"allow_print": 0,
"autoname": "Prompt",
+ "custom": 0,
"description": "DocType is a Table / Form in the application.",
"doctype": "DocType",
"hide_heading": 0,
@@ -68,12 +69,28 @@
"reqd": 1
},
{
+ "description": "Child Tables are shown as a Grid in other DocTypes.",
"doctype": "DocField",
- "fieldname": "plugin",
- "fieldtype": "Data",
- "hidden": 1,
- "label": "Plugin",
- "read_only": 0
+ "fieldname": "istable",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "label": "Is Child Table",
+ "oldfieldname": "istable",
+ "oldfieldtype": "Check",
+ "reqd": 0,
+ "search_index": 0
+ },
+ {
+ "description": "Single Types have only one record no tables associated. Values are stored in tabSingles",
+ "doctype": "DocField",
+ "fieldname": "issingle",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "label": "Is Single",
+ "oldfieldname": "issingle",
+ "oldfieldtype": "Check",
+ "reqd": 0,
+ "search_index": 0
},
{
"doctype": "DocField",
@@ -90,7 +107,12 @@
"options": "\nMaster\nTransaction\nSystem\nOther"
},
{
- "description": "Is it a Custom DocType created by you?",
+ "doctype": "DocField",
+ "fieldname": "icon",
+ "fieldtype": "Data",
+ "label": "Icon"
+ },
+ {
"doctype": "DocField",
"fieldname": "custom",
"fieldtype": "Check",
@@ -99,19 +121,11 @@
},
{
"doctype": "DocField",
- "fieldname": "sb0_5",
- "fieldtype": "Section Break"
- },
- {
- "doctype": "DocField",
- "fieldname": "description",
- "fieldtype": "Small Text",
- "hidden": 0,
- "label": "Description",
- "oldfieldname": "description",
- "oldfieldtype": "Text",
- "reqd": 0,
- "search_index": 0
+ "fieldname": "plugin",
+ "fieldtype": "Data",
+ "hidden": 1,
+ "label": "Plugin",
+ "read_only": 0
},
{
"doctype": "DocField",
@@ -140,51 +154,6 @@
"fieldname": "sb1",
"fieldtype": "Section Break"
},
- {
- "doctype": "DocField",
- "fieldname": "cb10",
- "fieldtype": "Column Break",
- "label": "Database"
- },
- {
- "description": "No table is created for Single DocTypes, all values are stored in tabSingles as a tuple.",
- "doctype": "DocField",
- "fieldname": "issingle",
- "fieldtype": "Check",
- "hidden": 0,
- "label": "Is Single",
- "oldfieldname": "issingle",
- "oldfieldtype": "Check",
- "reqd": 0,
- "search_index": 0
- },
- {
- "description": "Child Tables are shown as a Grid in other DocTypes.",
- "doctype": "DocField",
- "fieldname": "istable",
- "fieldtype": "Check",
- "hidden": 0,
- "label": "Is Child Table",
- "oldfieldname": "istable",
- "oldfieldtype": "Check",
- "reqd": 0,
- "search_index": 0
- },
- {
- "description": "Allow Import via Data Import Tool",
- "doctype": "DocField",
- "fieldname": "allow_import",
- "fieldtype": "Check",
- "label": "Allow Import"
- },
- {
- "doctype": "DocField",
- "fieldname": "cb11",
- "fieldtype": "Column Break",
- "label": "Naming",
- "oldfieldtype": "Column Break",
- "width": "50%"
- },
{
"description": "\\\nfield:[fieldname] - By Field\\\nnaming_series: - By Naming Series (field called naming_series must be present\\\neval:[expression] - Evaluate an expression in python (self is doc)\\\nPrompt - Prompt user for a name\\\n[series] - Series by prefix (separated by a dot); for example PRE.#####\\\n')\">Naming Options",
"doctype": "DocField",
@@ -206,6 +175,11 @@
"oldfieldtype": "Select",
"options": "\nTitle Case\nUPPER CASE"
},
+ {
+ "doctype": "DocField",
+ "fieldname": "column_break_15",
+ "fieldtype": "Column Break"
+ },
{
"doctype": "DocField",
"fieldname": "search_fields",
@@ -271,6 +245,13 @@
"fieldtype": "Check",
"label": "Is Submittable"
},
+ {
+ "description": "Allow Import via Data Import Tool",
+ "doctype": "DocField",
+ "fieldname": "allow_import",
+ "fieldtype": "Check",
+ "label": "Allow Import"
+ },
{
"doctype": "DocField",
"fieldname": "allow_rename",
@@ -279,6 +260,39 @@
"oldfieldname": "allow_rename",
"oldfieldtype": "Check"
},
+ {
+ "doctype": "DocField",
+ "fieldname": "in_dialog",
+ "fieldtype": "Check",
+ "label": "In Dialog",
+ "oldfieldname": "in_dialog",
+ "oldfieldtype": "Check"
+ },
+ {
+ "doctype": "DocField",
+ "fieldname": "read_only_onload",
+ "fieldtype": "Check",
+ "label": "Show Print First",
+ "oldfieldname": "read_only_onload",
+ "oldfieldtype": "Check"
+ },
+ {
+ "doctype": "DocField",
+ "fieldname": "allow_attach",
+ "fieldtype": "Check",
+ "label": "Allow Attach",
+ "oldfieldname": "allow_attach",
+ "oldfieldtype": "Check"
+ },
+ {
+ "doctype": "DocField",
+ "fieldname": "max_attachments",
+ "fieldtype": "Int",
+ "hidden": 1,
+ "label": "Max Attachments",
+ "oldfieldname": "max_attachments",
+ "oldfieldtype": "Int"
+ },
{
"doctype": "DocField",
"fieldname": "cb31",
@@ -340,28 +354,6 @@
"reqd": 0,
"search_index": 0
},
- {
- "doctype": "DocField",
- "fieldname": "sb4",
- "fieldtype": "Section Break",
- "hidden": 0,
- "oldfieldtype": "Column Break",
- "reqd": 0,
- "search_index": 0,
- "width": "50%"
- },
- {
- "doctype": "DocField",
- "fieldname": "cb41",
- "fieldtype": "Column Break",
- "label": "Display"
- },
- {
- "doctype": "DocField",
- "fieldname": "icon",
- "fieldtype": "Data",
- "label": "Icon"
- },
{
"doctype": "DocField",
"fieldname": "default_print_format",
@@ -370,42 +362,14 @@
},
{
"doctype": "DocField",
- "fieldname": "read_only_onload",
- "fieldtype": "Check",
- "label": "Show Print First",
- "oldfieldname": "read_only_onload",
- "oldfieldtype": "Check"
- },
- {
- "doctype": "DocField",
- "fieldname": "in_dialog",
- "fieldtype": "Check",
- "label": "In Dialog",
- "oldfieldname": "in_dialog",
- "oldfieldtype": "Check"
- },
- {
- "doctype": "DocField",
- "fieldname": "cb42",
- "fieldtype": "Column Break",
- "label": "Attachments"
- },
- {
- "doctype": "DocField",
- "fieldname": "allow_attach",
- "fieldtype": "Check",
- "label": "Allow Attach",
- "oldfieldname": "allow_attach",
- "oldfieldtype": "Check"
- },
- {
- "doctype": "DocField",
- "fieldname": "max_attachments",
- "fieldtype": "Int",
- "hidden": 1,
- "label": "Max Attachments",
- "oldfieldname": "max_attachments",
- "oldfieldtype": "Int"
+ "fieldname": "description",
+ "fieldtype": "Small Text",
+ "hidden": 0,
+ "label": "Description",
+ "oldfieldname": "description",
+ "oldfieldtype": "Text",
+ "reqd": 0,
+ "search_index": 0
},
{
"cancel": 0,
diff --git a/core/doctype/event/event.txt b/core/doctype/event/event.txt
index 6456639e58..e036d2f855 100644
--- a/core/doctype/event/event.txt
+++ b/core/doctype/event/event.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-06-10 13:17:47",
"docstatus": 0,
- "modified": "2013-07-26 14:41:43",
+ "modified": "2013-11-03 11:08:35",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -126,7 +126,7 @@
},
{
"depends_on": "repeat_this_event",
- "description": "Leave blank if you have not decided the end date.",
+ "description": "Leave blank to repeat always",
"doctype": "DocField",
"fieldname": "repeat_till",
"fieldtype": "Date",
diff --git a/core/doctype/letter_head/letter_head.txt b/core/doctype/letter_head/letter_head.txt
index fdb0e77555..e2754148c9 100644
--- a/core/doctype/letter_head/letter_head.txt
+++ b/core/doctype/letter_head/letter_head.txt
@@ -2,7 +2,7 @@
{
"creation": "2012-11-22 17:45:46",
"docstatus": 0,
- "modified": "2013-07-25 15:27:38",
+ "modified": "2013-11-03 11:09:55",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -68,7 +68,7 @@
},
{
"depends_on": "letter_head_name",
- "description": "Your letter head content",
+ "description": "Letter Head in HTML",
"doctype": "DocField",
"fieldname": "content",
"fieldtype": "Text Editor",
diff --git a/core/doctype/print_format/print_format.txt b/core/doctype/print_format/print_format.txt
index 7db825dad3..1bf0c27e46 100644
--- a/core/doctype/print_format/print_format.txt
+++ b/core/doctype/print_format/print_format.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-01-23 19:54:43",
"docstatus": 0,
- "modified": "2013-07-05 14:50:50",
+ "modified": "2013-11-03 11:10:24",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -68,7 +68,7 @@
"search_index": 1
},
{
- "description": "Associate a DocType to the Print Format",
+ "description": "Belongs to",
"doctype": "DocField",
"fieldname": "doc_type",
"fieldtype": "Select",
diff --git a/core/doctype/profile/profile.txt b/core/doctype/profile/profile.txt
index 4e0e7cfc80..d40d833a23 100644
--- a/core/doctype/profile/profile.txt
+++ b/core/doctype/profile/profile.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-03-07 11:54:44",
"docstatus": 0,
- "modified": "2013-09-18 12:10:54",
+ "modified": "2013-11-03 11:10:54",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -70,7 +70,6 @@
"label": "Unsubscribed"
},
{
- "description": "Id of the profile will be the email.",
"doctype": "DocField",
"fieldname": "email",
"fieldtype": "Data",
@@ -217,7 +216,6 @@
"label": "Short Bio"
},
{
- "description": "Bio will be displayed in blog section etc.",
"doctype": "DocField",
"fieldname": "bio",
"fieldtype": "Small Text",
diff --git a/public/css/bootstrap.css b/public/css/bootstrap.css
index ff73608342..5511e8523e 100644
--- a/public/css/bootstrap.css
+++ b/public/css/bootstrap.css
@@ -1825,7 +1825,6 @@ legend {
label {
display: inline-block;
margin-bottom: 5px;
- font-weight: bold;
}
input[type="search"] {
@@ -4248,7 +4247,7 @@ textarea.input-group-sm > .input-group-btn > .btn {
.navbar {
position: relative;
- min-height: 50px;
+ min-height: 30px;
margin-bottom: 20px;
border: 1px solid transparent;
}
@@ -4418,7 +4417,7 @@ textarea.input-group-sm > .input-group-btn > .btn {
.navbar-brand {
float: left;
- padding: 15px 15px;
+ padding: 5px 15px;
font-size: 18px;
line-height: 20px;
}
@@ -4437,10 +4436,10 @@ textarea.input-group-sm > .input-group-btn > .btn {
.navbar-toggle {
position: relative;
float: right;
- padding: 9px 10px;
- margin-top: 8px;
+ padding: 5px 10px;
+ margin-top: -2px;
margin-right: 15px;
- margin-bottom: 8px;
+ margin-bottom: -2px;
background-color: transparent;
border: 1px solid transparent;
border-radius: 4px;
@@ -4464,7 +4463,7 @@ textarea.input-group-sm > .input-group-btn > .btn {
}
.navbar-nav {
- margin: 7.5px -15px;
+ margin: 2.5px -15px;
}
.navbar-nav > li > a {
@@ -4505,8 +4504,9 @@ textarea.input-group-sm > .input-group-btn > .btn {
float: left;
}
.navbar-nav > li > a {
- padding-top: 15px;
- padding-bottom: 15px;
+ padding-top: 5px;
+ padding-bottom: 5px;
+ font-size: 12px;
}
}
@@ -4521,9 +4521,9 @@ textarea.input-group-sm > .input-group-btn > .btn {
.navbar-form {
padding: 10px 15px;
- margin-top: 8px;
+ margin-top: -2px;
margin-right: -15px;
- margin-bottom: 8px;
+ margin-bottom: -2px;
margin-left: -15px;
border-top: 1px solid transparent;
border-bottom: 1px solid transparent;
@@ -4591,14 +4591,14 @@ textarea.input-group-sm > .input-group-btn > .btn {
}
.navbar-btn {
- margin-top: 8px;
- margin-bottom: 8px;
+ margin-top: -2px;
+ margin-bottom: -2px;
}
.navbar-text {
float: left;
- margin-top: 15px;
- margin-bottom: 15px;
+ margin-top: 5px;
+ margin-bottom: 5px;
}
@media (min-width: 768px) {
@@ -4726,12 +4726,12 @@ textarea.input-group-sm > .input-group-btn > .btn {
}
.navbar-inverse {
- background-color: #222222;
- border-color: #080808;
+ background-color: #333333;
+ border-color: #1a1a1a;
}
.navbar-inverse .navbar-brand {
- color: #999999;
+ color: #eeeeee;
}
.navbar-inverse .navbar-brand:hover,
@@ -4741,11 +4741,11 @@ textarea.input-group-sm > .input-group-btn > .btn {
}
.navbar-inverse .navbar-text {
- color: #999999;
+ color: #eeeeee;
}
.navbar-inverse .navbar-nav > li > a {
- color: #999999;
+ color: #eeeeee;
}
.navbar-inverse .navbar-nav > li > a:hover,
@@ -4758,7 +4758,7 @@ textarea.input-group-sm > .input-group-btn > .btn {
.navbar-inverse .navbar-nav > .active > a:hover,
.navbar-inverse .navbar-nav > .active > a:focus {
color: #ffffff;
- background-color: #080808;
+ background-color: #1a1a1a;
}
.navbar-inverse .navbar-nav > .disabled > a,
@@ -4783,14 +4783,14 @@ textarea.input-group-sm > .input-group-btn > .btn {
.navbar-inverse .navbar-collapse,
.navbar-inverse .navbar-form {
- border-color: #101010;
+ border-color: #212121;
}
.navbar-inverse .navbar-nav > .open > a,
.navbar-inverse .navbar-nav > .open > a:hover,
.navbar-inverse .navbar-nav > .open > a:focus {
color: #ffffff;
- background-color: #080808;
+ background-color: #1a1a1a;
}
.navbar-inverse .navbar-nav > .dropdown > a:hover .caret {
@@ -4799,8 +4799,8 @@ textarea.input-group-sm > .input-group-btn > .btn {
}
.navbar-inverse .navbar-nav > .dropdown > a .caret {
- border-top-color: #999999;
- border-bottom-color: #999999;
+ border-top-color: #eeeeee;
+ border-bottom-color: #eeeeee;
}
.navbar-inverse .navbar-nav > .open > a .caret,
@@ -4812,10 +4812,10 @@ textarea.input-group-sm > .input-group-btn > .btn {
@media (max-width: 767px) {
.navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header {
- border-color: #080808;
+ border-color: #1a1a1a;
}
.navbar-inverse .navbar-nav .open .dropdown-menu > li > a {
- color: #999999;
+ color: #eeeeee;
}
.navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover,
.navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus {
@@ -4826,7 +4826,7 @@ textarea.input-group-sm > .input-group-btn > .btn {
.navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover,
.navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus {
color: #ffffff;
- background-color: #080808;
+ background-color: #1a1a1a;
}
.navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a,
.navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover,
@@ -4837,7 +4837,7 @@ textarea.input-group-sm > .input-group-btn > .btn {
}
.navbar-inverse .navbar-link {
- color: #999999;
+ color: #eeeeee;
}
.navbar-inverse .navbar-link:hover {
diff --git a/public/css/common.css b/public/css/common.css
index 64b4095cf6..f53991adb4 100644
--- a/public/css/common.css
+++ b/public/css/common.css
@@ -1,6 +1,6 @@
body {
margin: 0px;
- padding-top: 70px;
+ padding-top: 50px;
padding-bottom: 50px;
}
@@ -98,13 +98,12 @@ div#freeze {
}
.icon-in-circle {
- color: white;
- background-color: #b7b7b7;
+ color: #b7b7b7;
+ background-color: white;
border-radius:50%;
- padding: 9px;
text-align: center;
- width: 38px;
- height: 38px;
+ width: 20px;
+ height: 20px;
font-size: 20px;
display: inline-block;
}
@@ -131,9 +130,10 @@ div#freeze {
margin-bottom: 3px;
}
-.link-field .btn {
- padding-left: 6px;
- padding-right: 6px;
+.link-field-btn a, .link-field-btn a:hover {
+ color: #888;
+ text-decoration: none;
+ margin-left: 3px;
}
/* list */
@@ -261,8 +261,8 @@ div#freeze {
}
.appframe .sub-title-area {
- margin-top: -26px;
- margin-left: 47px;
+ margin-top: -24px;
+ margin-left: 42px;
font-size: 100%;
}
@@ -277,8 +277,6 @@ div#freeze {
.navbar-icon-home {
vertical-align: middle;
- opacity: 0.7;
- Filter:alpha(opacity=70); /* For IE8 and earlier */
}
.navbar-icon-home:hover,
@@ -428,9 +426,14 @@ textarea.form-control {
/* form grid */
+.grid-heading-row {
+ padding: 8px;
+ border-bottom: 1px solid #dddddd;
+}
+
.rows .grid-row .divider {
- padding-bottom: 8px;
- margin-bottom: 8px;
+ padding-bottom: 5px;
+ margin-bottom: 5px;
border-bottom: 1px solid #dddddd;
}
diff --git a/public/css/nprogress.css b/public/css/nprogress.css
index 31ac4023e2..5c3a25857c 100644
--- a/public/css/nprogress.css
+++ b/public/css/nprogress.css
@@ -43,7 +43,7 @@
display: block;
position: fixed;
z-index: 1050;
- top: 15px;
+ top: 7px;
right: 15px;
}
diff --git a/public/js/wn/form/control.js b/public/js/wn/form/control.js
index 7829d2a74c..b2ebce8506 100644
--- a/public/js/wn/form/control.js
+++ b/public/js/wn/form/control.js
@@ -103,7 +103,9 @@ wn.ui.form.ControlImage = wn.ui.form.Control.extend({
make: function() {
this._super();
var me = this;
- this.$wrapper.on("refresh", function() {
+ this.$wrapper
+ .css({"margin-bottom": "10px"})
+ .on("refresh", function() {
me.$wrapper.empty();
if(me.df.options && me.frm.doc[me.df.options]) {
$("
")
@@ -144,7 +146,7 @@ wn.ui.form.ControlInput = wn.ui.form.Control.extend({
this.$wrapper = $('