Browse Source

Merge branch 'develop'

version-14
Pratik Vyas 10 years ago
parent
commit
ae74133cf5
11 changed files with 39 additions and 22 deletions
  1. +1
    -1
      frappe/__version__.py
  2. +1
    -1
      frappe/hooks.py
  3. BIN
      frappe/public/css/font/notosans-400.ttf
  4. BIN
      frappe/public/css/font/notosans-700.ttf
  5. +17
    -12
      frappe/public/js/frappe/form/control.js
  6. +1
    -1
      frappe/public/js/frappe/misc/datetime.js
  7. +3
    -3
      frappe/public/js/frappe/ui/filters.js
  8. +12
    -1
      frappe/templates/styles/standard.css
  9. +1
    -0
      frappe/utils/jinja.py
  10. +1
    -1
      setup.py
  11. +2
    -2
      test_sites/test_site/site_config.json

+ 1
- 1
frappe/__version__.py View File

@@ -1 +1 @@
__version__ = "4.5.0"
__version__ = "4.5.1"

+ 1
- 1
frappe/hooks.py View File

@@ -3,7 +3,7 @@ app_title = "Frappe Framework"
app_publisher = "Web Notes Technologies Pvt. Ltd."
app_description = "Full Stack Web Application Framework in Python"
app_icon = "assets/frappe/images/frappe.svg"
app_version = "4.5.0"
app_version = "4.5.1"
app_color = "#3498db"
app_email = "support@frappe.io"



BIN
frappe/public/css/font/notosans-400.ttf View File


BIN
frappe/public/css/font/notosans-700.ttf View File


+ 17
- 12
frappe/public/js/frappe/form/control.js View File

@@ -224,19 +224,21 @@ frappe.ui.form.ControlInput = frappe.ui.form.Control.extend({
} else {
// inline
var value = me.get_value();
if(me.parse) {
value = me.parse(value);
var parsed = me.parse ? me.parse(value) : value;
var set_input = function(before, after) {
if(before !== after) {
me.set_input(after);
} else {
me.set_mandatory && me.set_mandatory(before);
}
}
if(me.validate) {
me.validate(value, function(value1) {
if(value !== value1) {
me.set_input(value1)
} else {
me.set_mandatory && me.set_mandatory(value);
}
me.validate(parsed, function(validated) {
set_input(value, validated);
});
} else {
me.set_mandatory && me.set_mandatory(value);
set_input(value, parsed);

}
}
});
@@ -375,14 +377,17 @@ frappe.ui.form.ControlInt = frappe.ui.form.ControlData.extend({
return false;
})
},
parse: function(value) {
return cint(value, null);
},
validate: function(value, callback) {
return callback(cint(value, null));
return callback(value);
}
});

frappe.ui.form.ControlFloat = frappe.ui.form.ControlInt.extend({
validate: function(value, callback) {
return callback(isNaN(parseFloat(value)) ? null : flt(value));
parse: function(value) {
return isNaN(parseFloat(value)) ? null : flt(value);
},
format_for_input: function(value) {
var number_format;


+ 1
- 1
frappe/public/js/frappe/misc/datetime.js View File

@@ -9,7 +9,7 @@ frappe.provide("frappe.datetime");

$.extend(frappe.datetime, {
str_to_obj: function(d) {
return moment(d)._d;
return moment(d, "YYYY-MM-DD HH:mm:ss")._d;
},

obj_to_str: function(d) {


+ 3
- 3
frappe/public/js/frappe/ui/filters.js View File

@@ -365,12 +365,12 @@ frappe.ui.Filter = Class.extend({

if(this.field.df.fieldname==="docstatus") {
value = {0:"Draft", 1:"Submitted", 2:"Cancelled"}[value] || value;
}

if(this.field.df.original_type==="Check") {
} else if(this.field.df.original_type==="Check") {
value = {0:"No", 1:"Yes"}[cint(value)];
} else if (in_list(["Date", "Datetime"], this.field.df.fieldtype)) {
value = frappe.datetime.str_to_user(value);
} else {
value = this.field.get_value();
}

this.$btn_group.find(".toggle-filter")


+ 12
- 1
frappe/templates/styles/standard.css View File

@@ -1,4 +1,15 @@
@import url(https://fonts.googleapis.com/css?family=Noto+Sans:400,700);
@font-face {
font-family: 'Noto Sans';
font-style: normal;
font-weight: 400;
src: local('Noto Sans'), local('NotoSans'), url({{ frappe.get_url("/assets/frappe/css/font/notosans-400.ttf") }}) format('truetype');
}
@font-face {
font-family: 'Noto Sans';
font-style: normal;
font-weight: 700;
src: local('Noto Sans Bold'), local('NotoSans-Bold'), url({{ frappe.get_url("/assets/frappe/css/font/notosans-700.ttf")}}) format('truetype');
}

@media screen {
.print-format-gutter {


+ 1
- 0
frappe/utils/jinja.py View File

@@ -47,6 +47,7 @@ def get_allowed_functions_for_jenv():
# make available limited methods of frappe
"frappe": {
"_": frappe._,
"get_url": frappe.utils.get_url,
"format_value": frappe.format_value,
"format_date": frappe.utils.data.global_date_format,
"form_dict": frappe.local.form_dict,


+ 1
- 1
setup.py View File

@@ -1,7 +1,7 @@
from setuptools import setup, find_packages
import os

version = "4.5.0"
version = "4.5.1"

with open("requirements.txt", "r") as f:
install_requires = f.readlines()


+ 2
- 2
test_sites/test_site/site_config.json View File

@@ -1,6 +1,6 @@
{
"db_name": "test_frappe",
"db_password": "test_frappe",
"auto_email_id": "test@example.com",
"admin_password": "admin"
"admin_password": "admin",
"mute_emails": 1
}

Loading…
Cancel
Save