diff --git a/nan_tic_sao.diff b/nan_tic_sao.diff index 33530f4..341c91e 100644 --- a/nan_tic_sao.diff +++ b/nan_tic_sao.diff @@ -38,7 +38,7 @@ diff -r c87833138b4d Gruntfile.js + }, + }); - + // Load the plugin that provides the "uglify" task. + grunt.loadNpmTasks('grunt-contrib-copy'); grunt.loadNpmTasks('grunt-contrib-concat'); @@ -48,13 +48,13 @@ diff -r c87833138b4d Gruntfile.js 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 @@ -118,20 +118,6 @@ diff -r c87833138b4d package.json }, "keywords": [ "tryton" -diff -r c87833138b4d src/screen.js ---- a/public_data/sao/src/screen.js Tue Sep 16 10:10:20 2014 +0200 -+++ b/public_data/sao/src/screen.js Tue Sep 16 15:44:21 2014 +0200 -@@ -24,7 +24,9 @@ - 'label': 'Filters' // TODO translation - }); - tr.append(jQuery('').append(this.filter_button)); -- this.search_entry = jQuery(''); -+ this.search_entry = jQuery('', { -+ 'class': 'ui-widget ui-widget-content ui-corner-all' -+ }); - this.search_entry.keypress(function(e) { - if (e.which == 13) { - this.do_search(); 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 @@ -165,38 +151,6 @@ diff -r c87833138b4d src/tab.js 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 -@@ -1621,7 +1621,7 @@ - 'class': 'form-separator' - }); - if (text) { -- this.el.append(jQuery('

', { -+ this.el.append(jQuery('', { - 'text': text - })); - } -@@ -1840,7 +1840,7 @@ - attributes); - this.el = jQuery('', { - 'type': 'input', -- 'class': this.class_ -+ 'class': this.class_ + ' ui-widget ui-widget-content ui-corner-all' - }); - this.el.change(this.focus_out.bind(this)); - }, -@@ -1873,10 +1873,11 @@ - Sao.View.Form.Date._super.init.call(this, field_name, model, - attributes); - this.el = jQuery('

', { -- 'class': this.class_ -+ 'class': this.class_ + ' ui-widget' - }); - this.date = jQuery('', { -- 'type': 'input' -+ 'type': 'input', -+ 'class': 'ui-widget-content ui-corner-all' - }); - this.el.append(jQuery('
').append(this.date)); - this.date.datepicker({ @@ -1887,7 +1888,8 @@ 'icons': { 'primary': 'ui-icon-calendar' @@ -207,107 +161,6 @@ diff -r c87833138b4d src/view.js }); this.el.prepend(this.button); this.button.click(function() { -@@ -1983,10 +1985,14 @@ - init: function(field_name, model, attributes) { - Sao.View.Form.Selection._super.init.call(this, field_name, model, - attributes); -- this.el = jQuery('', { -+ 'class': 'form-selection ui-widget-content' -+ }); -+ this.el.append(jQuery('
').append(this.select)); -+ this.select.change(this.focus_out.bind(this)); - Sao.common.selection_mixin.init.call(this); - this.init_selection(); - }, -@@ -2001,10 +2007,22 @@ - if (callbak) { - callbak(); - } -+ if (field) { -+ var selection_widget = this; -+ this.select.combobox({ -+ 'change': function(event, selected_option) { -+ selection_widget.set_value(record, field); -+ }, -+ 'select': function(event, selected_option) { -+ selection_widget.set_value(record, field); -+ } -+ }); -+ // TODO: on_change/on_change_with doesn't work with combobox() -+ } - }.bind(this)); - }, - set_selection: function(selection) { -- var select = this.el; -+ var select = this.select; - select.empty(); - selection.forEach(function(e) { - select.append(jQuery('