From 6e9cf4205764ea65aaaa5bca49da367f54ffa505 Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Sun, 25 Jun 2017 16:57:33 +0800 Subject: [PATCH] floatbox --- bi/core.js | 14 +------------- docs/core.js | 14 +------------- src/core/controller/router.floatbox.js | 14 +------------- 3 files changed, 3 insertions(+), 39 deletions(-) diff --git a/bi/core.js b/bi/core.js index 9fcc4dc17c..849906039e 100644 --- a/bi/core.js +++ b/bi/core.js @@ -15985,19 +15985,7 @@ BI.FloatBoxRouter = BI.inherit(BI.WRouter, { BI.nextTick(function () { self.close(url); // view.end(); - var t = void 0, isNew = false, keys; - if (isValid) { - keys = modelData.split('.'); - BI.each(keys, function (i, k) { - if (i === 0) { - t = context.model.get(k) || (isNew = true); - } else { - t = t[k] || (isNew = true); - } - }) - } - isNew && context.model.removeChild(modelData); - !isNew && (context.listenEnd.apply(context, isValid ? keys : [modelData]) !== false) && context.populate(); + (context.listenEnd.apply(context, isValid ? modelData.split('.') : [modelData]) !== false) && context.populate(); }, 30) }).on("change:" + view.cid, _.bind(context.notifyParent, context)) } diff --git a/docs/core.js b/docs/core.js index 3c57cc67c9..9e42276578 100644 --- a/docs/core.js +++ b/docs/core.js @@ -21572,19 +21572,7 @@ BI.FloatBoxRouter = BI.inherit(BI.WRouter, { BI.nextTick(function () { self.close(url); // view.end(); - var t = void 0, isNew = false, keys; - if (isValid) { - keys = modelData.split('.'); - BI.each(keys, function (i, k) { - if (i === 0) { - t = context.model.get(k) || (isNew = true); - } else { - t = t[k] || (isNew = true); - } - }) - } - isNew && context.model.removeChild(modelData); - !isNew && (context.listenEnd.apply(context, isValid ? keys : [modelData]) !== false) && context.populate(); + (context.listenEnd.apply(context, isValid ? modelData.split('.') : [modelData]) !== false) && context.populate(); }, 30) }).on("change:" + view.cid, _.bind(context.notifyParent, context)) } diff --git a/src/core/controller/router.floatbox.js b/src/core/controller/router.floatbox.js index 5707f34fcc..ac1e51ae40 100644 --- a/src/core/controller/router.floatbox.js +++ b/src/core/controller/router.floatbox.js @@ -57,19 +57,7 @@ BI.FloatBoxRouter = BI.inherit(BI.WRouter, { BI.nextTick(function () { self.close(url); // view.end(); - var t = void 0, isNew = false, keys; - if (isValid) { - keys = modelData.split('.'); - BI.each(keys, function (i, k) { - if (i === 0) { - t = context.model.get(k) || (isNew = true); - } else { - t = t[k] || (isNew = true); - } - }) - } - isNew && context.model.removeChild(modelData); - !isNew && (context.listenEnd.apply(context, isValid ? keys : [modelData]) !== false) && context.populate(); + (context.listenEnd.apply(context, isValid ? modelData.split('.') : [modelData]) !== false) && context.populate(); }, 30) }).on("change:" + view.cid, _.bind(context.notifyParent, context)) }