added shortcuts

This commit is contained in:
Rushabh Mehta 2012-09-28 12:18:43 +05:30
parent 224714c248
commit cebb02753c
2 changed files with 17 additions and 1 deletions

View File

@ -195,3 +195,19 @@ erpnext.hide_naming_series = function() {
}
}
}
Mousetrap.bind(["command+g", "ctrl+g"], function() {
wn.ui.toolbar.search.show();
return false;
});
Mousetrap.bind(["command+s", "ctrl+s"], function() {
if(cur_frm)
cur_frm.save();
return false;
});
Mousetrap.bind(["command+n", "ctrl+n"], function() {
wn.ui.toolbar.new_dialog.show();
return false;
});

View File

@ -14,9 +14,9 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
wn.require('lib/js/lib/jscolor/jscolor.js');
cur_frm.cscript.onload_post_render = function() {
wn.require('lib/public/js/lib/jscolor/jscolor.js');
cur_frm.fields_dict.background_color.input.className = 'color';
jscolor.bind();
}