如何编辑这个EXT JS盒子

时间:2014-01-12 10:33:44

标签: php extjs

我几年前买了一个PHP / EXT JS2脚本,我需要更新它。我想知道如何编辑这个EXT JS BOX

我不能在这里发布完整的EXT JS代码,因为它会杀死我的浏览器, 我知道js编辑器像sencha但代码看起来很奇怪

ex:tvar fileStore = new Ext.data.JsonStore({\r\n//\t\t\t\t\)

http://pastebin.com/ktZZStMN

它从php代码中调用这些js文件

    echo " <link rel=\"stylesheet\" type=\"text/css\" href=\"";
    echo $settings["ext_path"];
    echo "/extensions/lovcombo/css/Ext.ux.form.LovCombo.compressed.css?r=1\">\r\n <link rel=\"stylesheet\" type=\"text/css\" href=\"";
    echo $settings["ext_path"];
    echo "/extensions/lovcombo/css/lovcombo.compressed.css\">\r\n <link rel=\"stylesheet\" type=\"text/css\" href=\"";
    echo $settings["ext_path"];
    echo "/extensions/iconlovcombo/css/iconlovcombo.compressed.css\">\r\n\r\n <script type=\"text/javascript\" src=\"";
    echo $settings["ext_path"];
    echo "/extensions/gridsearch/Ext.ux.grid.Search.compressed.js\"></script>\r\n <script type=\"text/javascript\" src=\"";
    echo $settings["ext_path"];
    echo "/extensions/treesearch/Ext.ux.tree.Search.compressed.js\"></script>\r\n <script type=\"text/javascript\" src=\"";
    echo $settings["ext_path"];
    echo "/extensions/checkcolumn/checkcolumn.compressed.js\"></script>\r\n <script type=\"text/javascript\" src=\"";
    echo $settings["ext_path"];
    echo "/extensions/rowexpander/expander.compressed.js\"></script>\r\n <script type=\"text/javascript\" src=\"";
    echo $settings["ext_path"];
    echo "/extensions/tabclosemenu/ux.tabclosemenu.js?r=2\"></script>\r\n <script type=\"text/javascript\" src=\"";
    echo $settings["ext_path"];
    echo "/extensions/lovcombo/js/Ext.ux.form.LovCombo.compressed.js\">   </script>\r\n <script type=\"text/javascript\" src=\"";
    echo $settings["ext_path"];
    echo "/extensions/iconlovcombo/js/Ext.ux.form.IconLovCombo.compressed.js\"></script>\r\n <script type=\"text/javascript\" src=\"";
    echo $settings["ext_path"];
    echo "/extensions/centerlayout/centerlayout.compressed.js\"></script>\r\n ";
    $includes = ob_get_clean();
    add_to_head($includes, false);

你能告诉我如何在视觉模式下编辑这个(我是js的新手)

非常感谢你

1 个答案:

答案 0 :(得分:1)

你的代码的问题在于它是用反斜杠转义的,以便在php中使用双引号字符串。阅读你的文件并使用这样的php再次保存,以便获得一个常规的javascript文件:

$js = file_get_contents('strangefile.js');
eval('$js = "' . $js . '";');
file_put_contents('newfile.js', $js);

关于以可视模式进行编辑: Sencha Architect允许您在设计模式下编辑UI。我从来没用过它,所以我说不出更多。