From f0fa3b936f71872e17aad21b5528a7a5c79d1621 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Fri, 13 Jul 2012 11:15:40 +0530 Subject: [PATCH] check_required fix --- conf/apache.conf | 38 +++++++++++++++++++++++++++----------- js/legacy/model/doclist.js | 2 +- js/wn/ui/appframe.js | 3 ++- 3 files changed, 30 insertions(+), 13 deletions(-) diff --git a/conf/apache.conf b/conf/apache.conf index 3c4aa6451d..26d9cdfe3e 100644 --- a/conf/apache.conf +++ b/conf/apache.conf @@ -7,17 +7,33 @@ Listen 8080 # Set your root folder here DocumentRoot /var/www/html/ - - - AllowOverride All - Order allow,deny + + AddHandler cgi-script .cgi .xml .py + + + # directory specific options + Options -Indexes +FollowSymLinks +ExecCGI + + # directory's index file + DirectoryIndex web.py + + # rewrite rule + RewriteEngine on + + # condition 1: + # ignore login-page.html, app.html, blank.html, unsupported.html + RewriteCond %{REQUEST_URI} ^((?!app\.html|blank\.html|unsupported\.html).)*$ + + # condition 2: if there are no slashes + # and file is .html or does not containt a . + RewriteCond %{REQUEST_URI} ^(?!.+/)((.+\.html)|([^.]+))$ + + # rewrite if both of the above conditions are true + RewriteRule ^(.+)$ web.py?page=$1 [NC,L] + + AllowOverride all + Order Allow,Deny Allow from all - - Options -Indexes +ExecCGI +FollowLinks - AddHandler cgi-script - - DirectoryIndex index.cgi index.html - RewriteEngine On - + \ No newline at end of file diff --git a/js/legacy/model/doclist.js b/js/legacy/model/doclist.js index 7b37f1c78c..e38d9b9b55 100644 --- a/js/legacy/model/doclist.js +++ b/js/legacy/model/doclist.js @@ -136,7 +136,7 @@ function check_required(dt, dn, parent_dt) { if(fl[i].fieldtype=='Table') { var no_value = true; - $.each(locals[fl[i].options], function(k,d) { + $.each(locals[fl[i].options] || {}, function(k,d) { if(d.parent==doc.name && d.parenttype==doc.doctype && d.parentfield==fl[i].fieldname) { no_value = false; } diff --git a/js/wn/ui/appframe.js b/js/wn/ui/appframe.js index 3ca97aef74..08fd7f8cdf 100644 --- a/js/wn/ui/appframe.js +++ b/js/wn/ui/appframe.js @@ -16,7 +16,8 @@ wn.ui.AppFrame = Class.extend({ }, title: function(txt) { - this.$titlebar.find('.appframe-title').html(txt); + this.clear_breadcrumbs(); + this.add_breadcrumb(txt); }, make_toolbar: function() { if(!this.$w.find('.appframe-toolbar').length)