Quellcode durchsuchen

Merge branch 'develop'

version-14
Pratik Vyas vor 11 Jahren
Ursprung
Commit
02336b5823
5 geänderte Dateien mit 19 neuen und 9 gelöschten Zeilen
  1. +1
    -1
      config.json
  2. +8
    -7
      public/js/wn/model/meta.js
  3. +1
    -1
      public/js/wn/ui/editor.js
  4. +3
    -0
      webnotes/build.py
  5. +6
    -0
      webnotes/translate.py

+ 1
- 1
config.json Datei anzeigen

@@ -1,6 +1,6 @@
{
"base_template": "lib/website/templates/base.html",
"framework_version": "3.8.0",
"framework_version": "3.9.0",
"modules": {
"Calendar": {
"color": "#2980b9",


+ 8
- 7
public/js/wn/model/meta.js Datei anzeigen

@@ -93,13 +93,8 @@ $.extend(wn.meta, {
},
get_print_formats: function(doctype) {
// if default print format is given, use it
var print_format_list = [];
if(locals.DocType[doctype].default_print_format)
print_format_list.push(locals.DocType[doctype].default_print_format)
if(!in_list(print_format_list, "Standard"))
print_format_list.push("Standard");
var print_format_list = ["Standard"];
var default_print_format = locals.DocType[doctype].default_print_format;
var print_formats = wn.model.get("Print Format", {doc_type: doctype})
.sort(function(a, b) { return (a > b) ? 1 : -1; });
@@ -107,6 +102,12 @@ $.extend(wn.meta, {
if(!in_list(print_format_list, d.name))
print_format_list.push(d.name);
});

if(default_print_format && default_print_format != "Standard") {
var index = print_format_list.indexOf(default_print_format) - 1;
print_format_list.sort().splice(index, 1);
print_format_list.unshift(default_print_format);
}
return print_format_list;
},


+ 1
- 1
public/js/wn/ui/editor.js Datei anzeigen

@@ -125,7 +125,7 @@ bsEditor = Class.extend({
clean_html: function() {
var html = this.editor.html() || "";
if(!strip(this.editor.text())) html = "";
if(!strip(this.editor.text()) && !(this.editor.find("img"))) html = "";
// html = html.replace(/(<br>|\s|<div><br><\/div>|&nbsp;)*$/, '');

// remove custom typography (use CSS!)


+ 3
- 0
webnotes/build.py Datei anzeigen

@@ -55,6 +55,9 @@ def clear_pyc_files():
from webnotes.utils import get_base_path
for path, folders, files in os.walk(get_base_path()):
if 'locale' in folders: folders.remove('locale')
if 'files' in folders: folders.remove('files')
if 'backups' in folders: folders.remove('backups')
for f in files:
if f.decode("utf-8").endswith(".pyc"):
os.remove(os.path.join(path, f))


+ 6
- 0
webnotes/translate.py Datei anzeigen

@@ -277,6 +277,9 @@ def export_messages(lang, outfile):
messages = {}
# extract messages
for (basepath, folders, files) in os.walk('.'):
if 'files' in folders: folders.remove('files')
if 'backups' in folders: folders.remove('backups')
def _get_messages(messages, basepath, mtype):
mlist = get_messages(basepath, mtype)
if not mlist:
@@ -309,6 +312,9 @@ def import_messages(lang, infile):
data = dict(get_all_messages_from_file(infile))
for (basepath, folders, files) in os.walk('.'):
if 'files' in folders: folders.remove('files')
if 'backups' in folders: folders.remove('backups')
def _update_lang_file(mtype):
"""create a langauge file for the given message type"""
messages = get_messages(basepath, mtype)


Laden…
Abbrechen
Speichern