小编Noe*_*aba的帖子

smarty将值从{math} equatio传递给变量

祝大家度过愉快的一天,我有事要问你好,更好地了解这里是我的代码:

{math equation=((($order_total-$commission)+$discount+$delivery_charge)*$rate)}
Run Code Online (Sandbox Code Playgroud)

我希望将其传递给另一个变量,在php中我想要像这样

<?php 
  $var=0
  foreach($result as $resultA){
   $var = $var+((($order_total-$commission)+$discount+$delivery_charge)*$rate);
}
?>
Run Code Online (Sandbox Code Playgroud)

希望你能帮助我们!

math variables equation smarty

6
推荐指数
1
解决办法
8182
查看次数

在tabpanel内的extjs视口

美好的一天,我是extjs新手,我使用extjs 3,我的布局有问题,我有tabpanel,标签1的内部将是视口,而标签2只是一个简单的内容,但当我点击tab2,视口不会消失,应该是视口仅在选项卡1或第一个选项卡上.以下是我的代码,请帮助,如果我的代码有问题怎么办?

var Tabs;
var chatUi;
var content = "centerpanel";

var viewport1 = new Ext.Viewport({
    //id:       'chatUiLayout',
    layout: 'border',
    //renderTo :    'liveChatTextLiveHelp',
    items: [{
        width: 150,
        region: 'east',
        title: 'east'
    }, {
        region: 'center',
        title: 'center'
    }]
});


Tabs = new Ext.TabPanel({
    id: 'liveChatTextLiveHelp',
    renderTo: 'div-live-chat',
    activeTab: 0,
    //region:       'center',
    //hieght:       200,
    plain: true,
    items: [{
        title: 'Live help',
        items: [ //viewport1  
        ],
        html: "<div id='" + content + "' class='90pers' ></div>"
    }, {
        title: 'Tab 2',
        html: "tab 2 …
Run Code Online (Sandbox Code Playgroud)

javascript extjs viewport tabpanel

2
推荐指数
1
解决办法
2290
查看次数

未选中子节点时取消选中父节点

我是新手extJs用户.我使用带有复选框的树面板,我想在未选中子节点时取消选中父节点.下面是我的代码,希望你能帮助我们,我不知道该怎么做.

我的treepanel的结构是这样的:

  • parentnode1
    • 子parentNode1.1
      • child1.1
      • child1.2
      • child1.3
    • subparentNode1.2
      • child2.1
      • child2.2
  • parentnode2
    • subparentNode2.1
      • child2.1.1


var treeCheck = new Ext.tree.TreePanel({
    //some code here
});

//event here

treeCheck.on('checkchange', function(node, checked) {
    if(node.hasChildNodes()==true) {

        node.eachChild(function(n) {
            n.getUI().toggleCheck(checked);
        });

    } else {

        if(!checked) {
            var _parentNode = node.parentNode;
            //i dont know what to do here...
            //specifically, i want to uncheck the parent node and subparent node
            //when the children/child node is unchecked
        }
    }
});
Run Code Online (Sandbox Code Playgroud)

javascript extjs

1
推荐指数
1
解决办法
3291
查看次数

标签 统计

extjs ×2

javascript ×2

equation ×1

math ×1

smarty ×1

tabpanel ×1

variables ×1

viewport ×1