Permalink
Browse files

corrected minor bugs related with previous refactorings

  • Loading branch information...
1 parent 500e534 commit 32716e089391435fb643079e04a06927409da38c @HoneyryderChuck committed Jan 22, 2012
@@ -146,6 +146,7 @@ def create
attrs[:new_permission_tags] = filter_permission_tags(form_tags.split(","), :read_write)
if attrs[:statement_id].present? # linked statement
+ attrs[:statement] = Statement.find(attrs.delete(:statement_id))
doc_attrs.clear
else
# add default parameters
@@ -44,7 +44,7 @@ def info_code
end
def info_code=(val)
- self.info_type = InfoType[val]
+ self.info_type = InfoType[val] if val.present?
end
def update_pending_image
@@ -101,7 +101,7 @@
// Statement form and statement show
if(statement.is('form'))
- statement.statementForm();
+ statement.statement_form();
else
that.statementUrl = $.trim(statement.find('.statement_url').text());
@@ -137,11 +137,11 @@
// if the statement is going to replace a statement already existing in the stack
if(element.length > 0) {
// if statement this statement is going to replace is from a different type
- if (that.domId.match('new') && element.data('echo.statement').getType() != that.statementType)
+ if (that.domId.match('new') && element.data('statement').statementType != that.statementType)
if (that.domParent && that.domParent.length > 0) {
- var key = $.inArray(domParent.substring(0,2),['ds','sr']) == -1 ?
- $("#" + domParent).data('echo.statement').getBreadcrumbKey() :
- domParent.substring(0,2);
+ var key = $.inArray(that.domParent.substring(0,2),['ds','sr']) == -1 ?
+ $("#" + that.domParent).data('statement').breadcrumbKey :
+ that.domParent.substring(0,2);
var parentBreadcrumb = that.breadcrumbApi.getBreadcrumb(key);
if (parentBreadcrumb.length > 0) {
parentBreadcrumb.nextAll().remove();
@@ -818,8 +818,9 @@
if (that.isEchoable)
statement.data('echoableApi').loadRatioBars(container);
},
- reinitialise: function(settings) {
- that.options = $.extend(that.options, settings, {load : false})
+ reinitialise: function(options) {
+ var that = this;
+ that.options = $.extend(that.options, options, {load : false})
that.refresh();
},
loadMessage: function(message) {

0 comments on commit 32716e0

Please sign in to comment.