not referencing parent scope when inside BEGIN in widgets tpl

v1.18.x
Julian Lam 10 years ago
parent d2e8d4d86e
commit bbbb362125

@ -3,7 +3,7 @@
define('admin/extend/widgets', function() { define('admin/extend/widgets', function() {
var Widgets = {}; var Widgets = {};
Widgets.init = function() { Widgets.init = function() {
$('#widgets .nav-pills a').on('click', function(ev) { $('#widgets .nav-pills a').on('click', function(ev) {
var $this = $(this); var $this = $(this);

@ -6,7 +6,7 @@
<ul class="nav nav-pills"> <ul class="nav nav-pills">
<!-- BEGIN templates --> <!-- BEGIN templates -->
<li class="<!-- IF @first -->active<!-- ENDIF @first -->"><a href="#" data-template="{templates.template}" data-toggle="pill">{templates.template}</a></li> <li class="<!-- IF @first -->active<!-- ENDIF @first -->"><a href="#" data-template="{template}" data-toggle="pill">{template}</a></li>
<!-- END templates --> <!-- END templates -->
</ul> </ul>
@ -14,10 +14,10 @@
<div class="col-xs-12"> <div class="col-xs-12">
<div class="tab-content"> <div class="tab-content">
<!-- BEGIN templates --> <!-- BEGIN templates -->
<div class="tab-pane <!-- IF @first -->active<!-- ENDIF @first -->" data-template="{templates.template}"> <div class="tab-pane <!-- IF @first -->active<!-- ENDIF @first -->" data-template="{template}">
<!-- BEGIN areas --> <!-- BEGIN areas -->
<div class="area" data-template="{templates.template}" data-location="{templates.areas.location}"> <div class="area" data-template="{template}" data-location="{areas.location}">
<h4>{templates.areas.name} <small>{templates.template} / {templates.areas.location}</small></h4> <h4>{areas.name} <small>{template} / {areas.location}</small></h4>
<div class="well widget-area"> <div class="well widget-area">
</div> </div>

@ -9,7 +9,6 @@ var async = require('async'),
(function(Widgets) { (function(Widgets) {
Widgets.render = function(uid, area, callback) { Widgets.render = function(uid, area, callback) {
if (!area.locations || !area.template) { if (!area.locations || !area.template) {
return callback(new Error('[[error:invalid-data]]')); return callback(new Error('[[error:invalid-data]]'));

Loading…
Cancel
Save