Commit e2291011e99259117f7536f6d97f9f810d657229

Authored by Andrey Karpikov
1 parent 4e2521e6

add type condition

@@ -247,11 +247,10 @@ module Kanjai @@ -247,11 +247,10 @@ module Kanjai
247 247
248 else 248 else
249 condition_process = true 249 condition_process = true
250 - p '!!!!!!!!!!!!!!!!!!!!!!'  
251 - p hash_value  
252 - p item[:attributes]['id'] 250 +
253 if item[:name] == 'condition' && @page_content.present? && item[:attributes] && item[:attributes]['id'] 251 if item[:name] == 'condition' && @page_content.present? && item[:attributes] && item[:attributes]['id']
254 - condition_process = hash_value[item[:attributes]['id']].to_i == 1 252 + condition_process = hash_value[item[:attributes]['id']].to_i == 1 if item[:attributes]['type'].to_s.empty? || item[:attributes]['type'].to_s == 'enable'
  253 + condition_process = hash_value[item[:attributes]['id']].to_i == 0 if item[:attributes]['type'].to_s == 'disable'
255 end 254 end
256 255
257 256
@@ -58,7 +58,8 @@ module Kanjai @@ -58,7 +58,8 @@ module Kanjai
58 conditions << { 58 conditions << {
59 id: node.attributes['id'].value, 59 id: node.attributes['id'].value,
60 name: node.attributes['itemname'].value, 60 name: node.attributes['itemname'].value,
61 - repeat_id: repeatItemId 61 + repeat_id: repeatItemId,
  62 + type: node.attributes['type'] ? node.attributes['type'].value : 'enable'
62 } 63 }
63 end 64 end
64 end 65 end
1 module Kanjai 1 module Kanjai
2 - VERSION = "0.0.272" 2 + VERSION = "0.0.273"
3 end 3 end