Skip to content

Commit

Permalink
fix for widget support
Browse files Browse the repository at this point in the history
  • Loading branch information
dbankier committed Jan 28, 2015
1 parent c7fe253 commit 0451459
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
13 changes: 10 additions & 3 deletions dist/nano.js
Expand Up @@ -8284,9 +8284,16 @@ function callHook(name, args, callback) {
function nano($, $model) {
for(var view_id in $.__views) {
var view = $.__views[view_id];
for(var prop in view) {
var value = view[prop];
if (typeof value === "string") {

//the binding properties are different for widgets
//need to iterate over the args property
var iter = view;
if (view.args && view.__controllerPath === "widget") {
iter = view.args;
}
for(var prop in iter) {
var value = iter[prop];
if (typeof value === "string" && !prop.match(/^__/)) {
var tags = value.match(regex);
if (tags) {
tags.forEach(function(tag) {
Expand Down
13 changes: 10 additions & 3 deletions src/nano.js
Expand Up @@ -55,9 +55,16 @@ function callHook(name, args, callback) {
function nano($, $model) {
for(var view_id in $.__views) {
var view = $.__views[view_id];
for(var prop in view) {
var value = view[prop];
if (typeof value === "string") {

//the binding properties are different for widgets
//need to iterate over the args property
var iter = view;
if (view.args && view.__controllerPath === "widget") {
iter = view.args;
}
for(var prop in iter) {
var value = iter[prop];
if (typeof value === "string" && !prop.match(/^__/)) {
var tags = value.match(regex);
if (tags) {
tags.forEach(function(tag) {
Expand Down

0 comments on commit 0451459

Please sign in to comment.