233 lines
9.6 KiB
Diff
233 lines
9.6 KiB
Diff
diff -r c87833138b4d Gruntfile.js
|
|
--- a/public_data/sao/Gruntfile.js Tue Sep 16 10:10:20 2014 +0200
|
|
+++ b/public_data/sao/Gruntfile.js Tue Sep 16 15:44:21 2014 +0200
|
|
@@ -3,6 +3,23 @@
|
|
// Project configuration.
|
|
grunt.initConfig({
|
|
pkg: grunt.file.readJSON('package.json'),
|
|
+ downloadfile: {
|
|
+ files: ['http://jqueryui.com/resources/download/jquery-ui-themes-1.11.1.zip']
|
|
+ },
|
|
+ 'unzip': {
|
|
+ catalog: {
|
|
+ src: 'jquery-ui-themes-1.11.1.zip',
|
|
+ dest: 'themes'
|
|
+ }
|
|
+ },
|
|
+ copy: {
|
|
+ theme: {
|
|
+ files: [
|
|
+ {expand:true, cwd:'themes/jquery-ui-themes-1.11.1/', src: ['**'], dest: 'dist/'},
|
|
+ {expand:true, cwd:'nan-tic-theme', src: ['**'], dest: 'dist/themes/nan-tic'}
|
|
+ ]
|
|
+ }
|
|
+ },
|
|
concat: {
|
|
dist: {
|
|
src: [
|
|
@@ -79,19 +96,27 @@
|
|
styles: {
|
|
files: ['src/*.less'],
|
|
tasks: 'less:dev'
|
|
+ },
|
|
+ theme_styles: {
|
|
+ files: ['themes/*/*.js', 'themes/*/*.css', 'themes/*/images'],
|
|
+ tasks: 'copy:theme'
|
|
}
|
|
- }
|
|
+ },
|
|
+
|
|
});
|
|
|
|
// Load the plugin that provides the "uglify" task.
|
|
+ grunt.loadNpmTasks('grunt-contrib-copy');
|
|
grunt.loadNpmTasks('grunt-contrib-concat');
|
|
grunt.loadNpmTasks('grunt-contrib-jshint');
|
|
grunt.loadNpmTasks('grunt-contrib-uglify');
|
|
grunt.loadNpmTasks('grunt-contrib-less');
|
|
grunt.loadNpmTasks('grunt-contrib-watch');
|
|
+ grunt.loadNpmTasks('grunt-downloadfile');
|
|
+ grunt.loadNpmTasks('grunt-zip');
|
|
|
|
// Default task(s).
|
|
- grunt.registerTask('default', ['concat', 'jshint', 'uglify', 'less:default']);
|
|
- grunt.registerTask('dev', ['concat', 'jshint', 'less:dev']);
|
|
+ grunt.registerTask('default', ['downloadfile', 'unzip', 'copy', 'concat', 'jshint', 'uglify', 'less:default']);
|
|
+ grunt.registerTask('dev', ['copy', 'concat', 'jshint', 'less:dev']);
|
|
|
|
};
|
|
diff -r c87833138b4d index.html
|
|
--- a/public_data/sao/index.html Tue Sep 16 10:10:20 2014 +0200
|
|
+++ b/public_data/sao/index.html Tue Sep 16 15:44:21 2014 +0200
|
|
@@ -21,6 +21,26 @@
|
|
document.write(unescape('%3CLINK rel="stylesheet" type="text/css" href="//code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css" media="screen"/%3E'));
|
|
}
|
|
</SCRIPT>
|
|
+ <!-- ComboBox from http://www.benknowscode.com/2013/03/finishing-jquery-ui-autocomplete_4743.html -->
|
|
+ <SCRIPT type="text/javascript" src="external/jquery.ui.combobox.js"></SCRIPT>
|
|
+ <LINK rel="stylesheet" type="text/css" href="external/jquery.ui.combobox.css"
|
|
+ media="screen"/>
|
|
+ <SCRIPT type="text/javascript">
|
|
+ if (typeof $.combobox == 'undefined') {
|
|
+ document.write(unescape('%3CSCRIPT type="text/javascript" src="http://bseth99.github.io/jquery-ui-extensions/ui/jquery.ui.combobox.js"%3E%3C/SCRIPT%3E'));
|
|
+ document.write(unescape('%3CLINK rel="stylesheet" type="text/css" href="http://bseth99.github.io/jquery-ui-extensions/themes/base/jquery.ui.combobox.css" media="screen"/%3E'));
|
|
+ }
|
|
+ </SCRIPT>
|
|
+ <!-- ComboBox from http://www.benknowscode.com/2013/03/finishing-jquery-ui-autocomplete_4743.html -->
|
|
+ <SCRIPT type="text/javascript" src="external/jquery.ui.combobox.js"></SCRIPT>
|
|
+ <LINK rel="stylesheet" type="text/css" href="external/jquery.ui.combobox.css"
|
|
+ media="screen"/>
|
|
+ <SCRIPT type="text/javascript">
|
|
+ if (typeof $.combobox == 'undefined') {
|
|
+ document.write(unescape('%3CSCRIPT type="text/javascript" src="http://bseth99.github.io/jquery-ui-extensions/ui/jquery.ui.combobox.js"%3E%3C/SCRIPT%3E'));
|
|
+ document.write(unescape('%3CLINK rel="stylesheet" type="text/css" href="http://bseth99.github.io/jquery-ui-extensions/themes/base/jquery.ui.combobox.css" media="screen"/%3E'));
|
|
+ }
|
|
+ </SCRIPT>
|
|
<SCRIPT type="text/javascript" src="dist/sao.min.js"></SCRIPT>
|
|
<LINK rel="stylesheet" type="text/css" href="dist/sao.min.css"
|
|
media="screen"/>
|
|
@@ -30,6 +50,12 @@
|
|
document.write(unescape('%3CLINK rel="stylesheet" type="text/css" href="dist/sao.css" media="screen"/%3E'));
|
|
}
|
|
</SCRIPT>
|
|
+ <SCRIPT type="text/javascript">
|
|
+ document.write(unescape('%3CLINK rel="stylesheet" type="text/css" href="dist/themes/nan-tic/sao-fixes.css" media="screen"/%3E'));
|
|
+ document.write(unescape('%3CLINK rel="stylesheet" type="text/css" href="dist/themes/redmond/jquery-ui.css" media="screen"/%3E'));
|
|
+ document.write(unescape('%3CLINK rel="stylesheet" type="text/css" href="dist/themes/redmond/theme.css" media="screen"/%3E'));
|
|
+ document.write(unescape('%3CLINK rel="stylesheet" type="text/css" href="dist/themes/nan-tic/custom.css" media="screen"/%3E'));
|
|
+ </SCRIPT>
|
|
</HEAD>
|
|
<BODY>
|
|
<DIV style="overflow: auto;">
|
|
diff -r c87833138b4d package.json
|
|
--- a/public_data/sao/package.json Tue Sep 16 10:10:20 2014 +0200
|
|
+++ b/public_data/sao/package.json Tue Sep 16 15:44:21 2014 +0200
|
|
@@ -25,11 +25,14 @@
|
|
"grunt": "~0.4.5",
|
|
"grunt-contrib-jshint": "~0.10.0",
|
|
"grunt-contrib-nodeunit": "~0.4.0",
|
|
+ "grunt-contrib-copy": "~0.4.0",
|
|
"grunt-contrib-concat": "~0.4.0",
|
|
"grunt-contrib-uglify": "~0.4.0",
|
|
"grunt-contrib-watch": "~0.6.1",
|
|
"grunt-contrib-less": "~0.11.0",
|
|
- "grunt-cli": "~0.1.13"
|
|
+ "grunt-cli": "~0.1.13",
|
|
+ "grunt-downloadfile": "~0.3.2",
|
|
+ "grunt-zip": "0.16.0"
|
|
},
|
|
"keywords": [
|
|
"tryton"
|
|
diff -r c87833138b4d src/tab.js
|
|
--- a/public_data/sao/src/tab.js Tue Sep 16 10:10:20 2014 +0200
|
|
+++ b/public_data/sao/src/tab.js Tue Sep 16 15:44:21 2014 +0200
|
|
@@ -85,7 +85,7 @@
|
|
},
|
|
create_toolbar: function() {
|
|
var toolbar = jQuery('<div/>', {
|
|
- 'class': 'ui-widget-header ui-corner-all'
|
|
+ 'class': 'tab-toolbar'
|
|
});
|
|
var add_button = function(tool) {
|
|
var click_func = function() {
|
|
@@ -93,7 +93,7 @@
|
|
};
|
|
var button = jQuery('<button/>').button({
|
|
id: tool[0],
|
|
- text: tool[2],
|
|
+ text: true,
|
|
icons: {
|
|
primary: tool[1]
|
|
},
|
|
@@ -282,7 +282,7 @@
|
|
].forEach(function(menu_action) {
|
|
var button = jQuery('<button/>').button({
|
|
id: menu_action[0],
|
|
- text: true,
|
|
+ text: false,
|
|
icons: {
|
|
primary: menu_action[1],
|
|
secondary: 'ui-icon-triangle-1-s'
|
|
diff -r c87833138b4d src/view.js
|
|
--- a/public_data/sao/src/view.js Tue Sep 16 10:10:20 2014 +0200
|
|
+++ b/public_data/sao/src/view.js Tue Sep 16 15:44:21 2014 +0200
|
|
@@ -1887,7 +1888,8 @@
|
|
'icons': {
|
|
'primary': 'ui-icon-calendar'
|
|
},
|
|
- 'text': false
|
|
+ 'text': false,
|
|
+ 'label': 'Show calendar' // TODO: translate
|
|
});
|
|
this.el.prepend(this.button);
|
|
this.button.click(function() {
|
|
@@ -2161,7 +2180,8 @@
|
|
'icons': {
|
|
'primary': 'ui-icon-search'
|
|
},
|
|
- 'text': false
|
|
+ 'text': false,
|
|
+ 'label': 'Search a record' // TODO: translate
|
|
});
|
|
this.but_open.click(this.edit.bind(this));
|
|
this.el.prepend(this.but_open);
|
|
@@ -2205,12 +2225,16 @@
|
|
this.but_open.button({
|
|
'icons': {
|
|
'primary': 'ui-icon-folder-open'
|
|
- }});
|
|
+ },
|
|
+ 'label': 'Open a record' // TODO: translate
|
|
+ });
|
|
} else {
|
|
this.but_open.button({
|
|
'icons': {
|
|
'primary': 'ui-icon-search'
|
|
- }});
|
|
+ },
|
|
+ 'label': 'Search a record' // TODO: translate
|
|
+ });
|
|
}
|
|
},
|
|
set_readonly: function(readonly) {
|
|
@@ -3129,7 +3158,8 @@
|
|
icons: {
|
|
primary: 'ui-icon-document'
|
|
},
|
|
- text: false
|
|
+ text: false,
|
|
+ label: 'Select a File...' // TODO: translate
|
|
});
|
|
this.but_new.click(this.new_.bind(this));
|
|
this.el.prepend(this.but_new);
|
|
@@ -3139,7 +3169,8 @@
|
|
icons: {
|
|
primary: 'ui-icon-folder-open'
|
|
},
|
|
- text: false
|
|
+ text: false,
|
|
+ label: 'Open...' // TODO: translate
|
|
});
|
|
this.but_open.click(this.open.bind(this));
|
|
this.el.prepend(this.but_open);
|
|
@@ -3149,7 +3180,8 @@
|
|
icons: {
|
|
primary: 'ui-icon-disk'
|
|
},
|
|
- text: false
|
|
+ text: false,
|
|
+ label: 'Save As...' // TODO: translate
|
|
});
|
|
this.but_save_as.click(this.save_as.bind(this));
|
|
this.el.prepend(this.but_save_as);
|
|
@@ -3158,7 +3190,8 @@
|
|
icons: {
|
|
primary: 'ui-icon-trash'
|
|
},
|
|
- text: false
|
|
+ text: false,
|
|
+ label: 'Clear' // TODO: translate
|
|
});
|
|
this.but_remove.click(this.remove.bind(this));
|
|
this.el.prepend(this.but_remove);
|