Commit 3bb05df43a8c849430115c6920c5a6b9e3189e3b

Authored by Helder
1 parent f8b9a890
Exists in master

Exclusão de arquivos

wscacicneo/static/.home.js.swn
No preview for this file type
wscacicneo/static/.home.js.swp
No preview for this file type
wscacicneo/static/.main.js.swn
No preview for this file type
wscacicneo/static/.teste-helder.js.swp
No preview for this file type
wscacicneo/static/get-nodes.php
... ... @@ -1,82 +0,0 @@
1   -
2   -n formatBytes($val, $digits = 3, $mode = 'SI', $bB = 'B'){ //$mode == 'SI'|'IEC', $bB == 'b'|'B'
3   - $si = array('', 'K', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y');
4   - $iec = array('', 'Ki', 'Mi', 'Gi', 'Ti', 'Pi', 'Ei', 'Zi', 'Yi');
5   - switch(strtoupper($mode)) {
6   - case 'SI' : $factor = 1000; $symbols = $si; break;
7   - case 'IEC' : $factor = 1024; $symbols = $iec; break;
8   - default : $factor = 1000; $symbols = $si; break;
9   - }
10   - switch($bB) {
11   - case 'b' : $val *= 8; break;
12   - default : $bB = 'B'; break;
13   - }
14   - for($i=0;$i<count($symbols)-1 && $val>=$factor;$i++)
15   - $val /= $factor;
16   - $p = strpos($val, '.');
17   - if($p !== false && $p > $digits) $val = round($val);
18   - elseif($p !== false) $val = round($val, $digits-$p);
19   - return round($val, $digits) . ' ' . $symbols[$i] . $bB;
20   -}
21   -
22   -// grab the custom params
23   -$path = isset($_REQUEST['path'])&&$_REQUEST['path'] == 'extjs' ? '../../../' : '../../';
24   -
25   -$node = isset($_REQUEST['node']) ? $_REQUEST['node'] : '';
26   -$isXml = isset($_REQUEST['isXml']);
27   -
28   -if(strpos($node, '..') !== false){
29   - die('Nice try buddy.');
30   -}
31   -
32   -$nodes = array();
33   -$directory = $path.$node;
34   -if (is_dir($directory)){
35   - $d = dir($directory);
36   - while($f = $d->read()){
37   - if($f == '.' || $f == '..' || substr($f, 0, 1) == '.') continue;
38   -
39   - $filename = $directory . '/' . $f;
40   - date_default_timezone_set('America/Los_Angeles');
41   - $lastmod = date('M j, Y, g:i a', filemtime($filename));
42   -
43   - if(is_dir($directory.'/'.$f)){
44   - $qtip = 'Type: Folder<br />Last Modified: '.$lastmod;
45   - $nodes[] = array(
46   - 'text' => $f,
47   - 'id' => $node.'/'.$f,
48   - 'cls' => 'folder',
49   - 'qtip' => $qtip
50   - );
51   - } else {
52   - $size = formatBytes(filesize($filename), 2);
53   - $qtip = 'Type: JavaScript File<br />Last Modified: '.$lastmod.'<br />Size: '.$size;
54   - $nodes[] = array(
55   - 'text' => $f,
56   - 'id' => $node.'/'.$f,
57   - 'leaf' => true,
58   - 'cls' => 'file',
59   - 'qtip' => $qtip
60   - );
61   - }
62   - }
63   - $d->close();
64   -}
65   -
66   -if ($isXml) {
67   - $xmlDoc = new DOMDocument();
68   - $root = $xmlDoc->appendChild($xmlDoc->createElement("nodes"));
69   - foreach ($nodes as $node) {
70   - $xmlNode = $root->appendChild($xmlDoc->createElement("node"));
71   - $xmlNode->appendChild($xmlDoc->createElement("text", $node['text']));
72   - $xmlNode->appendChild($xmlDoc->createElement("id", $node['id']));
73   - $xmlNode->appendChild($xmlDoc->createElement("cls", $node['cls']));
74   - $xmlNode->appendChild($xmlDoc->createElement("leaf", isset($node['leaf'])));
75   - }
76   - header("Content-Type: text/xml");
77   - $xmlDoc->formatOutput = true;
78   - echo $xmlDoc->saveXml();
79   -} else {
80   - header("Content-Type: text/json");
81   - echo json_encode($nodes);
82   -}
wscacicneo/static/teste.js
... ... @@ -1,119 +0,0 @@
1   -var coletas = Ext.create('Ext.data.Store', {
2   - model: 'User',
3   - data: [
4   - {company: 'Lisa',price: '200', change: '0,03', pctchange: '0,02', lastChange: '08/12/2014'},
5   - ]
6   -});
7   -
8   -
9   -
10   -
11   -Ext.define('KitchenSink.view.grid.ArrayGrid', {
12   - extend: 'Ext.grid.Panel',
13   - requires: [
14   - 'Ext.grid.column.Action'
15   - ],
16   - xtype: 'array-grid',
17   - store: 'coletas',
18   - stateful: true,
19   - collapsible: true,
20   - multiSelect: true,
21   - stateId: 'stateGrid',
22   - height: 350,
23   - title: 'Array Grid',
24   - viewConfig: {
25   - stripeRows: true,
26   - enableTextSelection: true
27   - },
28   -
29   - initComponent: function () {
30   - this.width = 650;
31   - this.columns = [
32   - {
33   - text : 'Company',
34   - flex : 1,
35   - sortable : false,
36   - dataIndex: 'company'
37   - },
38   - {
39   - text : 'Price',
40   - width : 75,
41   - sortable : true,
42   - renderer : 'usMoney',
43   - dataIndex: 'price'
44   - },
45   - {
46   - text : 'Change',
47   - width : 80,
48   - sortable : true,
49   - renderer : function(val) {
50   - if (val > 0) {
51   - return '<span style="color:' + '#73b51e' + ';">' + val + '</span>';
52   - } else if (val < 0) {
53   - return '<span style="color:' + '#cf4c35' + ';">' + val + '</span>';
54   - }
55   - return val;
56   - },
57   - dataIndex: 'change'
58   - },
59   - {
60   - text : '% Change',
61   - width : 100,
62   - sortable : true,
63   - renderer : function(val) {
64   - if (val > 0) {
65   - return '<span style="color:' + '#73b51e' + '">' + val + '%</span>';
66   - } else if (val < 0) {
67   - return '<span style="color:' + '#cf4c35' + ';">' + val + '%</span>';
68   - }
69   - return val;
70   - },
71   - dataIndex: 'pctChange'
72   - },
73   - {
74   - text : 'Last Updated',
75   - width : 115,
76   - sortable : true,
77   - renderer : Ext.util.Format.dateRenderer('m/d/Y'),
78   - dataIndex: 'lastChange'
79   - },
80   - {
81   - menuDisabled: true,
82   - sortable: false,
83   - xtype: 'actioncolumn',
84   - width: 50,
85   - items: [{
86   - iconCls: 'sell-col',
87   - tooltip: 'Sell stock',
88   - handler: function(grid, rowIndex, colIndex) {
89   - var rec = grid.getStore().getAt(rowIndex);
90   - Ext.Msg.alert('Sell', 'Sell ' + rec.get('company'));
91   - }
92   - }, {
93   - getClass: function(v, meta, rec) {
94   - if (rec.get('change') < 0) {
95   - return 'alert-col';
96   - } else {
97   - return 'buy-col';
98   - }
99   - },
100   - getTip: function(v, meta, rec) {
101   - if (rec.get('change') < 0) {
102   - return 'Hold stock';
103   - } else {
104   - return 'Buy stock';
105   - }
106   - },
107   - handler: function(grid, rowIndex, colIndex) {
108   - var rec = grid.getStore().getAt(rowIndex),
109   - action = (rec.get('change') < 0 ? 'Hold' : 'Buy');
110   -
111   - Ext.Msg.alert(action, action + ' ' + rec.get('company'));
112   - }
113   - }]
114   - }
115   - ];
116   -
117   - this.callParent();
118   - }
119   -});