From 08ac4e9e533129c97bede327c3a7e09693c7b1b0 Mon Sep 17 00:00:00 2001 From: Dmitry Fedyuk Date: Sat, 13 Jan 2018 15:49:15 +0600 Subject: [PATCH] 1.3.0: https://github.com/discourse-pro/df-paypal-buy-now/issues/1 --- assets/javascripts/admin/i.js.es6 | 12 +++------ plugin.rb | 43 +++++++++++-------------------- 2 files changed, 18 insertions(+), 37 deletions(-) diff --git a/assets/javascripts/admin/i.js.es6 b/assets/javascripts/admin/i.js.es6 index c3d7d3d..04e9281 100644 --- a/assets/javascripts/admin/i.js.es6 +++ b/assets/javascripts/admin/i.js.es6 @@ -1,9 +1,7 @@ import SiteSetting from 'admin/components/site-setting'; export default {name: 'df-core-admin', initialize() { /** @type {String[]} */ - const myTypes = [ - 'df_editor', 'df_password', 'df_textarea', 'paid_membership_plans', 'paypal_buttons' - ]; + const myTypes = ['df_editor', 'df_password', 'df_textarea', 'paid_membership_plans', 'paypal_buttons']; SiteSetting.reopen({ /** * 2015-07-06 @@ -17,8 +15,7 @@ export default {name: 'df-core-admin', initialize() { */ _dfDidInsertElement: function() { const settingName = this.get('setting.setting'); - // Проворачиваем нашу операцию только для наших настроек, - // не затрагивая настройки ядра. + // Проворачиваем нашу операцию только для наших настроек, не затрагивая настройки ядра. if (-1 < settingName.indexOf('«')) { this.$().closest('.row.setting').addClass(this.get('setting.setting')); } @@ -27,10 +24,7 @@ export default {name: 'df-core-admin', initialize() { var type = this.get('setting.type'); return -1 < myTypes.indexOf(type) ? type : this._super(); }.property('setting.type') - /** - * 2015-08-27 - * https://meta.discourse.org/t/32572 - */ + // 2015-08-27 https://meta.discourse.org/t/32572 ,typeClass: function() { return this.get('componentType').replace(/_/g, '-'); }.property('componentType') diff --git a/plugin.rb b/plugin.rb index da61165..723f546 100644 --- a/plugin.rb +++ b/plugin.rb @@ -1,6 +1,6 @@ # name: df-core # about: A common functionality of my Discourse plugins. -# version: 1.2.7 +# version: 1.3.0 # authors: Dmitry Fedyuk # url: https://discourse.pro #register_asset 'javascripts/lib/sprintf.js' @@ -93,7 +93,7 @@ def request(method, params = {}) core__request method, params end end -# 2018-01-09 +# 2018-01-12 # 1) "«NameError: uninitialized constant SiteSettings::DefaultsProvider::DistributedCache» # on `bundle exec rake db:migrate` after upgrading to Discourse v1.9.0.beta11": # https://github.com/discourse-pro/df-core/issues/1 @@ -103,36 +103,23 @@ def request(method, params = {}) require 'site_setting_extension' if defined?(SiteSettings::TypeSupervisor) SiteSettings::TypeSupervisor.module_eval do - alias_method :core__to_rb_value, :to_rb_value - def to_rb_value(name, value, override_type = nil) - begin - result = core__to_rb_value(name, value, override_type) - rescue ArgumentError - result = value + class <