',{
'class': 'portlet-header'
- }).html(child.attrs.string),
+ }).html(child.attrs.string).append(
+ jQuery('
',{
+ 'class': 'ui-icon ui-icon-minusthick'
+ })
+ ),
jQuery('',{
- 'class': 'portlet-content'
- }).html('test')
+ 'class': 'portlet-content',
+ 'id': child.attrs.name+'-portlet-content'
+ })
)
)
}
@@ -99,7 +81,6 @@ openerp.base.form.Dashbar = openerp.base.form.Widget.extend({
$( ".portlet" ).addClass( "ui-widget ui-widget-content ui-helper-clearfix ui-corner-all" )
.find( ".portlet-header" )
.addClass( "ui-widget-header ui-corner-all" )
- .prepend( "")
.end()
.find( ".portlet-content" );
@@ -113,10 +94,8 @@ openerp.base.form.Dashbar = openerp.base.form.Widget.extend({
})
openerp.base.form.Action = openerp.base.form.Widget.extend({
- init: function(view, node, board, child_index) {
- this._super(view, node, board, child_index);
- this.board = board;
- this.child_index = child_index;
+ init: function(view, node) {
+ this._super(view, node);
},
start: function() {
this._super.apply(this, arguments);
@@ -128,26 +107,14 @@ openerp.base.form.Action = openerp.base.form.Widget.extend({
on_load_action: function(result) {
var action = result.action;
-
- action.search_view = false;
+ action.search_view = action.search_view_id = false;
action.no_sidebar = true;
- action.search_view_id = false;
var node_attrs = this.node.attrs;
- var get_column = ['first', 'second', 'third'];
- var board_element = this.board.element.find('[id=column-'+get_column[this.child_index]+']');
-
- this.board.addWidget({
- 'id': node_attrs.name,
- 'title': node_attrs.string,
- }, board_element);
-
- var content_id = node_attrs.name+'-widgetcontent';
- this.board.getWidget(node_attrs.name).element.find('.widgetcontent').attr('id',content_id)
-
- action_manager = new openerp.base.ActionManager(this.session, content_id);
+ var content_id = jQuery('#'+node_attrs.name).find('.portlet-content').attr('id')
+ var action_manager = new openerp.base.ActionManager(this.session, content_id);
action_manager.start();
- this.board.getWidget(node_attrs.name).url = action_manager.do_action(action);
+ action_manager.do_action(action);
}
})