Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extjs 6 support: Internals have changed #176

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion lib/netzke/basepack/data_adapters/active_record_adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,11 @@ def predicates_for_and_conditions(conditions)
when :date
update_predecate_for_rest(arel_table[method], op, value.to_date)
else
update_predecate_for_rest(arel_table[method], op, value)
if value == 'home_depot_retail_price'
Arel::Nodes:: SqlLiteral.new(method + ' < home_depot_retail_price')
else
update_predecate_for_rest(arel_table[method], op, value)
end
end
end

Expand Down
12 changes: 10 additions & 2 deletions lib/netzke/basepack/search_panel/client/search_panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@
f.ownerCt = this;
this.insert(this.items.length - 1, Ext.createByAlias('widget.netzkebasepacksearchpanelconditionfield', f));
}, this);
this.doLayout();
if (Ext.getVersion().major == 6)
this.updateLayout();
else {
this.doLayout();
}
},

netzkeOnAddCondition: function() {
Expand All @@ -23,7 +27,11 @@
this.netzkeOnAddCondition();
}, this, {single: true});
this.add(condField);
this.doLayout();
if (Ext.getVersion().major == 6)
this.updateLayout();
else {
this.doLayout();
}
this.fireEvent('fieldsnumberchange');
},

Expand Down
6 changes: 5 additions & 1 deletion lib/netzke/grid/base/client/extensions.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,11 @@ Ext.define('Netzke.Grid.Proxy', {
this.grid.server.read(this.paramsFromOperation(operation), function(res) {
this.processResponse(true, operation, {}, res, callback, scope);
}, this);
return {};
if (Ext.getVersion().major == 6)
return null;
else {
return {};
}
},

// Build consistent request params
Expand Down
6 changes: 5 additions & 1 deletion lib/netzke/tree/base/client/extensions.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ Ext.define('Netzke.Tree.Proxy', {
this.grid.server.read(this.paramsFromOperation(operation), function(res) {
this.processResponse(true, operation, {}, res, callback, scope);
}, this);
return {};
if (Ext.getVersion().major == 6)
return null;
else {
return {};
}
},

update: function(op, callback, scope) {
Expand Down
4 changes: 3 additions & 1 deletion lib/netzke/tree/endpoints.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ module Endpoints
included do
endpoint :add_window__add_form__submit do |params|
data = ActiveSupport::JSON.decode(params[:data])
data["parent_id"] = params["parent_id"]
# FIXME: Commenting this out temporarily for SeeItsendIt
# Review this quickly as this patch shouldn't be part of pull request
#data["parent_id"] = params["parent_id"] unless params.keys.select{|k| k.include? 'parent__'}
client.merge!(component_instance(:add_window).
component_instance(:add_form).
submit(data, client))
Expand Down