Skip to content
Browse files

3.0 upgrade commit

  • Loading branch information...
1 parent 0077add commit f02943da1d0f9f05c3d371242ca7fd6b078c57d8 @honestbleeps honestbleeps committed Oct 30, 2013
Showing with 3,690 additions and 147 deletions.
  1. +7 −0 .gitignore
  2. +24 −65 ExtReddit/ExtReddit.xds
  3. +10 −3 ExtReddit/app.js
  4. +14 −0 ExtReddit/app.json
  5. +15 −0 ExtReddit/app/Readme.md
  6. +3 −0 ExtReddit/app/controller/Main.js
  7. +1 −0 ExtReddit/app/controller/Readme.md
  8. +1 −1 ExtReddit/app/controller/UserController.js
  9. +1 −0 ExtReddit/app/model/Readme.md
  10. +5 −1 ExtReddit/app/model/RedditPost.js
  11. +1 −0 ExtReddit/app/store/Readme.md
  12. +3 −1 ExtReddit/app/store/redditHomepage.js
  13. +1 −0 ExtReddit/app/view/Readme.md
  14. +1 −1 ExtReddit/app/view/RedditGrid.js
  15. +1 −1 ExtReddit/app/view/SettingsPanel.js
  16. +1,850 −0 ExtReddit/bootstrap.js
  17. +7 −0 ExtReddit/bootstrap.json
  18. +19 −0 ExtReddit/index.html
  19. +5 −6 ExtReddit/metadata/Application
  20. +3 −4 ExtReddit/metadata/controller/UserController
  21. +9 −18 ExtReddit/metadata/model/RedditPost
  22. +4 −0 ExtReddit/metadata/resource/Library
  23. +3 −2 ExtReddit/metadata/resource/css
  24. +1 −0 ExtReddit/metadata/resource/js
  25. +81 −8 ExtReddit/metadata/store/redditHomepage
  26. +16 −32 ExtReddit/metadata/view/RedditGrid
  27. +4 −4 ExtReddit/metadata/view/SettingsPanel
  28. +7 −0 ExtReddit/packages/default/sass/app.scss
  29. +68 −0 ExtReddit/packages/default/sass/config.rb
  30. +12 −0 ExtReddit/packages/default/slice-src/custom.js
  31. +193 −0 ExtReddit/packages/default/slice-src/manifest.js
  32. +441 −0 ExtReddit/packages/default/slice-src/render.js
  33. +835 −0 ExtReddit/packages/default/slice-src/shortcuts.js
  34. +43 −0 ExtReddit/packages/default/theme.html
  35. +1 −0 ExtReddit/resources/default/app.css
  36. BIN ExtReddit20131030162747.xda
View
7 .gitignore
@@ -0,0 +1,7 @@
+.architect
+.sencha
+.sencha_backup
+ext
+build
+build.xml
+.idea
View
89 ExtReddit/ExtReddit.xds
@@ -1,75 +1,34 @@
{
"name": "ExtReddit",
"settings": {
+ "cmd": {
+ "license": "commercial",
+ "cmdVersion": "4.0.1.30",
+ "frameworkVersion": "4.1.1"
+ },
"urlPrefix": "http://localhost/~steve/architectprojects/ExtReddit/",
- "exportPath": ""
+ "exportPath": "",
+ "canvasControls": {
+ "viewportSize": {
+ "name": "Auto Expand",
+ "builtIn": true,
+ "height": null,
+ "width": null
+ }
+ },
+ "spacesToIndent": 4,
+ "sdkPath": "",
+ "lineEnding": "LF",
+ "genTimestamps": false,
+ "cacheBust": false,
+ "buildShouldOverwriteIndex": true,
+ "generateArchitectVersion": true
},
- "xdsVersion": "2.2.0",
- "xdsBuild": 894,
+ "xdsVersion": "3.0.0",
+ "xdsBuild": 0,
"schemaVersion": 1,
- "upgradeVersion": 210000000499,
+ "upgradeVersion": 300000000001,
"framework": "ext41",
- "topInstanceFileMap": {
- "55d3ca0b-c7e6-44bc-b786-c9b0f8a2693c": {
- "paths": [
- "metadata/model/RedditPost",
- "app/model/override/RedditPost.js",
- "app/model/RedditPost.js"
- ],
- "className": "RedditPost"
- },
- "806dc76a-43ae-4cf3-a624-20b915e91afd": {
- "paths": [
- "metadata/resource/Library"
- ],
- "className": "Library"
- },
- "2c287404-9f99-46c8-9d50-459ab8e503e1": {
- "paths": [
- "metadata/view/RedditGrid",
- "app/view/override/RedditGrid.js",
- "app/view/RedditGrid.js",
- "app/view/Viewport.js"
- ],
- "className": "RedditGrid"
- },
- "f0614e19-3c8a-4a65-88b8-617e77db563f": {
- "paths": [
- "metadata/store/redditHomepage",
- "app/store/override/redditHomepage.js",
- "app/store/redditHomepage.js"
- ],
- "className": "redditHomepage"
- },
- "b58b6bb6-72a1-404e-a7f8-13a194f94f7f": {
- "paths": [
- "metadata/resource/css"
- ],
- "className": "css"
- },
- "bed9e27d-aa99-463f-ae0d-8c2867cc7e0a": {
- "paths": [
- "metadata/resource/js"
- ],
- "className": "js"
- },
- "69acfe15-89f2-44df-afff-6f6cb446320f": {
- "paths": [
- "metadata/controller/UserController",
- "app/controller/override/UserController.js",
- "app/controller/UserController.js"
- ],
- "className": "UserController"
- },
- "c6f7b539-ff92-43a0-a632-66c94746e3b1": {
- "paths": [
- "metadata/view/SettingsPanel",
- "app/view/override/SettingsPanel.js",
- "app/view/SettingsPanel.js"
- ],
- "className": "SettingsPanel"
- }
- },
"viewOrderMap": {
"view": [
"2c287404-9f99-46c8-9d50-459ab8e503e1",
View
13 ExtReddit/app.js
@@ -1,7 +1,7 @@
/*
* File: app.js
*
- * This file was generated by Sencha Architect version 2.2.0.
+ * This file was generated by Sencha Architect version 3.0.0.
* http://www.sencha.com/products/architect/
*
* This file requires use of the Ext JS 4.1.x library, under independent license.
@@ -13,10 +13,12 @@
* Do NOT hand edit this file.
*/
+// @require @packageOverrides
Ext.Loader.setConfig({
enabled: true
});
+
Ext.application({
requires: [
@@ -33,9 +35,14 @@ Ext.application({
'RedditGrid',
'SettingsPanel'
],
- autoCreateViewport: true,
controllers: [
'UserController'
],
- name: 'MyApp'
+ name: 'MyApp',
+
+ launch: function() {
+
+ Ext.create('MyApp.view.RedditGrid', {renderTo: Ext.getBody()});
+ }
+
});
View
14 ExtReddit/app.json
@@ -0,0 +1,14 @@
+{
+ "name": "ExtReddit",
+ "requires": [],
+ "id": "a2bce66c-7865-43e3-a25a-58d20b7412f9",
+ "resources": [
+ "css/style.css"
+ ],
+ "_architect": {
+ "_comment": "Please don't edit. This is Architect data.",
+ "resources": [
+ "css/style.css"
+ ]
+ }
+}
View
15 ExtReddit/app/Readme.md
@@ -0,0 +1,15 @@
+# ./controller
+
+This folder contains the controllers
+
+# ./model
+
+This folder contains the models
+
+# ./view
+
+This folder contains the views
+
+# ./store
+
+This folder contains the stores
View
3 ExtReddit/app/controller/Main.js
@@ -0,0 +1,3 @@
+Ext.define('ExtReddit.controller.Main', {
+ extend: 'Ext.app.Controller'
+});
View
1 ExtReddit/app/controller/Readme.md
@@ -0,0 +1 @@
+This folder contains the controllers
View
2 ExtReddit/app/controller/UserController.js
@@ -1,7 +1,7 @@
/*
* File: app/controller/UserController.js
*
- * This file was generated by Sencha Architect version 2.2.0.
+ * This file was generated by Sencha Architect version 3.0.0.
* http://www.sencha.com/products/architect/
*
* This file requires use of the Ext JS 4.1.x library, under independent license.
View
1 ExtReddit/app/model/Readme.md
@@ -0,0 +1 @@
+This folder contains the models
View
6 ExtReddit/app/model/RedditPost.js
@@ -1,7 +1,7 @@
/*
* File: app/model/RedditPost.js
*
- * This file was generated by Sencha Architect version 2.2.0.
+ * This file was generated by Sencha Architect version 3.0.0.
* http://www.sencha.com/products/architect/
*
* This file requires use of the Ext JS 4.1.x library, under independent license.
@@ -16,6 +16,10 @@
Ext.define('MyApp.model.RedditPost', {
extend: 'Ext.data.Model',
+ requires: [
+ 'Ext.data.Field'
+ ],
+
fields: [
{
mapping: 'data.title',
View
1 ExtReddit/app/store/Readme.md
@@ -0,0 +1 @@
+This folder contains the stores
View
4 ExtReddit/app/store/redditHomepage.js
@@ -1,7 +1,7 @@
/*
* File: app/store/redditHomepage.js
*
- * This file was generated by Sencha Architect version 2.2.0.
+ * This file was generated by Sencha Architect version 3.0.0.
* http://www.sencha.com/products/architect/
*
* This file requires use of the Ext JS 4.1.x library, under independent license.
@@ -17,6 +17,8 @@ Ext.define('MyApp.store.redditHomepage', {
extend: 'Ext.data.Store',
requires: [
+ 'Ext.data.proxy.JsonP',
+ 'Ext.data.reader.Json',
'MyApp.model.RedditPost'
],
View
1 ExtReddit/app/view/Readme.md
@@ -0,0 +1 @@
+This folder contains the views
View
2 ExtReddit/app/view/RedditGrid.js
@@ -1,7 +1,7 @@
/*
* File: app/view/RedditGrid.js
*
- * This file was generated by Sencha Architect version 2.2.0.
+ * This file was generated by Sencha Architect version 3.0.0.
* http://www.sencha.com/products/architect/
*
* This file requires use of the Ext JS 4.1.x library, under independent license.
View
2 ExtReddit/app/view/SettingsPanel.js
@@ -1,7 +1,7 @@
/*
* File: app/view/SettingsPanel.js
*
- * This file was generated by Sencha Architect version 2.2.0.
+ * This file was generated by Sencha Architect version 3.0.0.
* http://www.sencha.com/products/architect/
*
* This file requires use of the Ext JS 4.1.x library, under independent license.
View
1,850 ExtReddit/bootstrap.js
1,850 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
7 ExtReddit/bootstrap.json
@@ -0,0 +1,7 @@
+
+/**
+ * This file is generated by Sencha Cmd and should NOT be edited. It is a
+ * combination of content from app.json, and all required package's package.json
+ * files. Customizations should be placed in app.json.
+ */
+{"id":"a2bce66c-7865-43e3-a25a-58d20b7412f9","js":[],"css":[]}
View
19 ExtReddit/index.html
@@ -0,0 +1,19 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+ <meta charset="UTF-8">
+ <title>ExtReddit</title>
+ <!-- <x-compile> -->
+ <!-- <x-bootstrap> -->
+ <script src="ext/ext-dev.js"></script>
+ <script src="bootstrap.js"></script>
+ <!-- </x-bootstrap> -->
+ <script src="js/redditlib.js"></script>
+ <script type="text/javascript" src="app.js"></script>
+ <!-- </x-compile> -->
+ <link rel="stylesheet" href="resources/default/app.css">
+ <link rel="stylesheet" href="css/style.css" id="style">
+</head>
+<body>
+</body>
+</html>
View
11 ExtReddit/metadata/Application
@@ -6,21 +6,20 @@
},
"codeClass": null,
"userConfig": {
+ "controllers": [
+ "UserController"
+ ],
"models": [
"RedditPost"
],
+ "name": "MyApp",
"stores": [
"redditHomepage"
],
"views": [
"RedditGrid",
"SettingsPanel"
- ],
- "autoCreateViewport": true,
- "controllers": [
- "UserController"
- ],
- "name": "MyApp"
+ ]
},
"designerId": "application"
}
View
7 ExtReddit/metadata/controller/UserController
@@ -18,17 +18,16 @@
},
"codeClass": null,
"userConfig": {
- "designer|userClassName": "onToolClick",
+ "designer|controlQuery": "#settingsTool",
+ "designer|targetType": "Ext.panel.Tool",
"fn": "onToolClick",
"implHandler": [
"var panel = Ext.create('MyApp.view.SettingsPanel');",
"",
"panel.show();"
],
"name": "click",
- "scope": "me",
- "designer|targetType": "Ext.panel.Tool",
- "designer|controlQuery": "#settingsTool"
+ "scope": "me"
},
"designerId": "36b3729d-ae71-4501-af77-b3b57e3b0a7c"
}
View
27 ExtReddit/metadata/model/RedditPost
@@ -19,8 +19,7 @@
"codeClass": null,
"userConfig": {
"mapping": "data.title",
- "name": "title",
- "designer|userClassName": "MyField"
+ "name": "title"
},
"designerId": "d830d4b5-b2ac-425b-8cc6-da67ae515325"
},
@@ -33,8 +32,7 @@
"codeClass": null,
"userConfig": {
"mapping": "data.url",
- "name": "url",
- "designer|userClassName": "MyField1"
+ "name": "url"
},
"designerId": "7c1500c4-5a42-4436-bffb-4657c26d6172"
},
@@ -47,8 +45,7 @@
"codeClass": null,
"userConfig": {
"mapping": "data.subreddit",
- "name": "subreddit",
- "designer|userClassName": "MyField2"
+ "name": "subreddit"
},
"designerId": "e8e17a88-c257-4b45-9c11-4fd18b1e9e0e"
},
@@ -61,8 +58,7 @@
"codeClass": null,
"userConfig": {
"mapping": "data.selftext_html",
- "name": "selftext_html",
- "designer|userClassName": "MyField3"
+ "name": "selftext_html"
},
"designerId": "3ee9ac96-f1ee-4205-8164-5669e6801447"
},
@@ -75,8 +71,7 @@
"codeClass": null,
"userConfig": {
"mapping": "data.ups",
- "name": "ups",
- "designer|userClassName": "MyField4"
+ "name": "ups"
},
"designerId": "f80410c5-de05-466d-9523-972d1d7352c6"
},
@@ -89,8 +84,7 @@
"codeClass": null,
"userConfig": {
"mapping": "data.downs",
- "name": "downs",
- "designer|userClassName": "MyField5"
+ "name": "downs"
},
"designerId": "2fa233f4-32c6-4bbd-a016-4e2205dda05a"
},
@@ -103,8 +97,7 @@
"codeClass": null,
"userConfig": {
"mapping": "data.is_self",
- "name": "is_self",
- "designer|userClassName": "MyField6"
+ "name": "is_self"
},
"designerId": "3398dc7f-a929-43ac-8b88-ad0e967a3f6c"
},
@@ -117,8 +110,7 @@
"codeClass": null,
"userConfig": {
"mapping": "data.permalink",
- "name": "permalink",
- "designer|userClassName": "MyField7"
+ "name": "permalink"
},
"designerId": "56f13129-dd7e-49ea-8a55-301acb974b23"
},
@@ -131,8 +123,7 @@
"codeClass": null,
"userConfig": {
"mapping": "data.author",
- "name": "author",
- "designer|userClassName": "MyField8"
+ "name": "author"
},
"designerId": "1b92ee3e-abc2-4e2e-931c-354283dd2cbe"
}
View
4 ExtReddit/metadata/resource/Library
@@ -5,5 +5,9 @@
"type": "array"
},
"codeClass": null,
+ "userConfig": {
+ "basePath": "ext/",
+ "designer|userClassName": "Library"
+ },
"designerId": "806dc76a-43ae-4cf3-a624-20b915e91afd"
}
View
5 ExtReddit/metadata/resource/css
@@ -6,8 +6,9 @@
},
"codeClass": null,
"userConfig": {
- "url": "css/style.css",
- "id": "style"
+ "designer|userClassName": "css",
+ "id": "style",
+ "url": "css/style.css"
},
"designerId": "b58b6bb6-72a1-404e-a7f8-13a194f94f7f"
}
View
1 ExtReddit/metadata/resource/js
@@ -6,6 +6,7 @@
},
"codeClass": null,
"userConfig": {
+ "designer|userClassName": "js",
"url": "js/redditlib.js"
},
"designerId": "bed9e27d-aa99-463f-ae0d-8c2867cc7e0a"
View
89 ExtReddit/metadata/store/redditHomepage
@@ -7,10 +7,85 @@
"codeClass": null,
"userConfig": {
"autoLoad": true,
- "model": "RedditPost",
- "storeId": "MyJsonPStore",
+ "data": [
+ "[",
+ " {",
+ " \"domain\": \"sencha.com\",",
+ " \"banned_by\": null,",
+ " \"media_embed\": {},",
+ " \"subreddit\": \"programming\",",
+ " \"selftext_html\": null,",
+ " \"selftext\": \"\",",
+ " \"likes\": null,",
+ " \"link_flair_text\": null,",
+ " \"id\": \"180j37\",",
+ " \"clicked\": false,",
+ " \"title\": \"Build amazing apps with Sencha Architect!\",",
+ " \"num_comments\": 473,",
+ " \"score\": 3773,",
+ " \"approved_by\": null,",
+ " \"over_18\": false,",
+ " \"hidden\": false,",
+ " \"thumbnail\": \"\",",
+ " \"subreddit_id\": \"t5_2qh33\",",
+ " \"edited\": false,",
+ " \"link_flair_css_class\": null,",
+ " \"author_flair_css_class\": null,",
+ " \"downs\": 7798,",
+ " \"saved\": false,",
+ " \"is_self\": false,",
+ " \"permalink\": \"/r/programming/fakeid/this_is_not_a_real_post\",",
+ " \"name\": \"t3_180j37\",",
+ " \"created\": 1360206801,",
+ " \"url\": \"http://www.sencha.com/products/architect\",",
+ " \"author_flair_text\": null,",
+ " \"author\": \"SenchaShill\",",
+ " \"created_utc\": 1360178001,",
+ " \"media\": null,",
+ " \"num_reports\": null,",
+ " \"ups\": 11571",
+ " },",
+ " {",
+ " \"domain\": \"imgur.com\",",
+ " \"banned_by\": null,",
+ " \"media_embed\": {},",
+ " \"subreddit\": \"aww\",",
+ " \"selftext_html\": null,",
+ " \"selftext\": \"\",",
+ " \"likes\": null,",
+ " \"link_flair_text\": null,",
+ " \"id\": \"1809p6\",",
+ " \"clicked\": false,",
+ " \"title\": \"They think it's their mom.\",",
+ " \"num_comments\": 347,",
+ " \"score\": 3816,",
+ " \"approved_by\": null,",
+ " \"over_18\": false,",
+ " \"hidden\": false,",
+ " \"thumbnail\": \"http://e.thumbs.redditmedia.com/nSRIy6duqWqmAqlp.jpg\",",
+ " \"subreddit_id\": \"t5_2qh1o\",",
+ " \"edited\": false,",
+ " \"link_flair_css_class\": null,",
+ " \"author_flair_css_class\": null,",
+ " \"downs\": 8702,",
+ " \"saved\": false,",
+ " \"is_self\": false,",
+ " \"permalink\": \"/r/aww/comments/1809p6/they_think_its_their_mom/\",",
+ " \"name\": \"t3_1809p6\",",
+ " \"created\": 1360199266,",
+ " \"url\": \"http://imgur.com/iA0h9qx\",",
+ " \"author_flair_text\": null,",
+ " \"author\": \"9GAG_IS_FOR_TOOLS\",",
+ " \"created_utc\": 1360170466,",
+ " \"media\": null,",
+ " \"num_reports\": null,",
+ " \"ups\": 12518",
+ " }",
+ "]"
+ ],
"designer|userClassName": "redditHomepage",
- "data": "[\n {\n \"domain\": \"sencha.com\",\n \"banned_by\": null,\n \"media_embed\": {},\n \"subreddit\": \"programming\",\n \"selftext_html\": null,\n \"selftext\": \"\",\n \"likes\": null,\n \"link_flair_text\": null,\n \"id\": \"180j37\",\n \"clicked\": false,\n \"title\": \"Build amazing apps with Sencha Architect!\",\n \"num_comments\": 473,\n \"score\": 3773,\n \"approved_by\": null,\n \"over_18\": false,\n \"hidden\": false,\n \"thumbnail\": \"\",\n \"subreddit_id\": \"t5_2qh33\",\n \"edited\": false,\n \"link_flair_css_class\": null,\n \"author_flair_css_class\": null,\n \"downs\": 7798,\n \"saved\": false,\n \"is_self\": false,\n \"permalink\": \"/r/programming/fakeid/this_is_not_a_real_post\",\n \"name\": \"t3_180j37\",\n \"created\": 1360206801,\n \"url\": \"http://www.sencha.com/products/architect\",\n \"author_flair_text\": null,\n \"author\": \"SenchaShill\",\n \"created_utc\": 1360178001,\n \"media\": null,\n \"num_reports\": null,\n \"ups\": 11571\n },\n {\n \"domain\": \"imgur.com\",\n \"banned_by\": null,\n \"media_embed\": {},\n \"subreddit\": \"aww\",\n \"selftext_html\": null,\n \"selftext\": \"\",\n \"likes\": null,\n \"link_flair_text\": null,\n \"id\": \"1809p6\",\n \"clicked\": false,\n \"title\": \"They think it's their mom.\",\n \"num_comments\": 347,\n \"score\": 3816,\n \"approved_by\": null,\n \"over_18\": false,\n \"hidden\": false,\n \"thumbnail\": \"http://e.thumbs.redditmedia.com/nSRIy6duqWqmAqlp.jpg\",\n \"subreddit_id\": \"t5_2qh1o\",\n \"edited\": false,\n \"link_flair_css_class\": null,\n \"author_flair_css_class\": null,\n \"downs\": 8702,\n \"saved\": false,\n \"is_self\": false,\n \"permalink\": \"/r/aww/comments/1809p6/they_think_its_their_mom/\",\n \"name\": \"t3_1809p6\",\n \"created\": 1360199266,\n \"url\": \"http://imgur.com/iA0h9qx\",\n \"author_flair_text\": null,\n \"author\": \"9GAG_IS_FOR_TOOLS\",\n \"created_utc\": 1360170466,\n \"media\": null,\n \"num_reports\": null,\n \"ups\": 12518\n }\n]"
+ "model": "RedditPost",
+ "storeId": "MyJsonPStore"
},
"mockCfgs": [
"data"
@@ -25,10 +100,9 @@
},
"codeClass": null,
"userConfig": {
- "designer|userClassName": "MyJsonPProxy",
+ "callbackKey": "jsonp",
"designer|displayName": "redditJSONProxy",
- "url": "http://www.reddit.com/.json",
- "callbackKey": "jsonp"
+ "url": "http://www.reddit.com/.json"
},
"designerId": "7ca6932d-5f47-465e-a1e7-96cb37d05e57",
"cn": [
@@ -40,8 +114,7 @@
},
"codeClass": null,
"userConfig": {
- "root": "data.children",
- "designer|userClassName": "MyJsonReader"
+ "root": "data.children"
},
"designerId": "a3f6511b-191f-49f9-8b52-c8dea2b51c74"
}
View
48 ExtReddit/metadata/view/RedditGrid
@@ -6,12 +6,12 @@
},
"codeClass": null,
"userConfig": {
- "height": null,
- "width": 797,
- "designer|userClassName": "RedditGrid",
"designer|initialView": true,
+ "designer|userClassName": "RedditGrid",
+ "height": null,
+ "store": "redditHomepage",
"title": "Reddit Posts",
- "store": "redditHomepage"
+ "width": 797
},
"designerId": "2c287404-9f99-46c8-9d50-459ab8e503e1",
"cn": [
@@ -22,9 +22,6 @@
"type": "object"
},
"codeClass": null,
- "userConfig": {
- "designer|userClassName": "MyGridView"
- },
"designerId": "869a387f-1101-43b4-b3c3-3152d367198f"
},
{
@@ -35,13 +32,12 @@
},
"codeClass": null,
"userConfig": {
+ "dataIndex": "title",
+ "defaultWidth": 300,
"maxHeight": null,
"minHeight": null,
- "width": 456,
- "designer|userClassName": "MyColumn1",
- "defaultWidth": 300,
- "dataIndex": "title",
- "text": "Title"
+ "text": "Title",
+ "width": 456
},
"designerId": "fc2476cb-2724-42b9-94ca-a98d9c9ad810",
"cn": [
@@ -53,8 +49,6 @@
},
"codeClass": null,
"userConfig": {
- "designer|userClassName": "renderer",
- "fn": "renderer",
"designer|params": [
"value",
"metaData",
@@ -64,6 +58,7 @@
"store",
"view"
],
+ "fn": "renderer",
"implHandler": [
"return '<strong><a target=\"_blank\" href=\"'+record.get('url')+'\">' + value + '</a></strong>';"
]
@@ -80,7 +75,6 @@
},
"codeClass": null,
"userConfig": {
- "designer|userClassName": "MyColumn3",
"dataIndex": "subreddit",
"text": "Subreddit"
},
@@ -94,8 +88,6 @@
},
"codeClass": null,
"userConfig": {
- "designer|userClassName": "renderer",
- "fn": "renderer",
"designer|params": [
"value",
"metaData",
@@ -105,6 +97,7 @@
"store",
"view"
],
+ "fn": "renderer",
"implHandler": [
"return '<a target=\"_blank\" href=\"http://reddit.com/r/'+value+'\">'+value+'</a>';"
]
@@ -121,10 +114,9 @@
},
"codeClass": null,
"userConfig": {
- "width": 140,
- "designer|userClassName": "MyColumn7",
"defaultWidth": 200,
- "text": "Points"
+ "text": "Points",
+ "width": 140
},
"designerId": "ec86d874-7e19-4d71-954b-1613c0eee242",
"cn": [
@@ -136,8 +128,6 @@
},
"codeClass": null,
"userConfig": {
- "designer|userClassName": "renderer",
- "fn": "renderer",
"designer|params": [
"value",
"metaData",
@@ -147,6 +137,7 @@
"store",
"view"
],
+ "fn": "renderer",
"implHandler": [
"var points = record.data.ups - record.data.downs;",
"return points + \" (<span class='ups'>\"+record.data.ups+\"</span>/<span class='downs'>\"+record.data.downs+\"</span>)\";"
@@ -164,9 +155,8 @@
},
"codeClass": null,
"userConfig": {
- "hidden": true,
- "designer|userClassName": "MyColumn7",
"dataIndex": "is_self",
+ "hidden": true,
"text": "Is_self"
},
"designerId": "80d6d2d0-aa05-41dd-a486-689c5ec881f3"
@@ -179,9 +169,8 @@
},
"codeClass": null,
"userConfig": {
- "hidden": true,
- "designer|userClassName": "MyColumn8",
"dataIndex": "permalink",
+ "hidden": true,
"text": "Permalink"
},
"designerId": "08cf7ee9-8144-4eb2-bbfd-b59e8cfed919"
@@ -194,7 +183,6 @@
},
"codeClass": null,
"userConfig": {
- "designer|userClassName": "MyColumn9",
"dataIndex": "author",
"text": "Author"
},
@@ -208,8 +196,6 @@
},
"codeClass": null,
"userConfig": {
- "designer|userClassName": "renderer",
- "fn": "renderer",
"designer|params": [
"value",
"metaData",
@@ -219,6 +205,7 @@
"store",
"view"
],
+ "fn": "renderer",
"implHandler": [
"return '<a href=\"http://reddit.com/u/'+value+'\">'+value+'</a>';"
]
@@ -236,7 +223,6 @@
"codeClass": null,
"userConfig": {
"itemId": "settingsTool",
- "designer|userClassName": "MyTool1",
"type": "gear"
},
"designerId": "b622cd91-923a-4f3f-aa6f-4662b5051673"
@@ -249,7 +235,6 @@
},
"codeClass": null,
"userConfig": {
- "designer|userClassName": "MyTool",
"type": "refresh"
},
"designerId": "aa67189d-2b0f-4308-9741-053e88a0c7f1",
@@ -262,7 +247,6 @@
},
"codeClass": null,
"userConfig": {
- "designer|userClassName": "onToolClick",
"fn": "onToolClick",
"implHandler": [
"Ext.getStore('redditHomepage').reload();"
View
8 ExtReddit/metadata/view/SettingsPanel
@@ -6,12 +6,12 @@
},
"codeClass": null,
"userConfig": {
+ "closable": true,
+ "designer|userClassName": "SettingsPanel",
"floating": true,
"height": 250,
- "width": 400,
- "designer|userClassName": "SettingsPanel",
- "closable": true,
- "title": "Settings"
+ "title": "Settings",
+ "width": 400
},
"designerId": "c6f7b539-ff92-43a0-a632-66c94746e3b1"
}
View
7 ExtReddit/packages/default/sass/app.scss
@@ -0,0 +1,7 @@
+$theme-name: 'default';
+
+// Windows Classic gray
+//$base-color: #D4D0C8;
+
+@import 'compass';
+@import 'ext4/default/all';
View
68 ExtReddit/packages/default/sass/config.rb
@@ -0,0 +1,68 @@
+# Get the directory that this configuration file exists in
+dir = File.dirname(__FILE__)
+$ext_path = File.join('..', '..', '..', 'ext')
+
+# Load the extjs framework automatically.
+load File.join($ext_path, 'resources', 'themes')
+$images_dir = File.join("images")
+
+# Compass configurations
+sass_path = dir
+css_path = File.join("..", "..", "..", "resources", "default")
+output_style = :compressed
+environment = :production
+
+# Disable warnings during sass compilation about missing paths to images
+# due to images being placed in build output directory, not source working directory
+disable_warnings = true
+
+module AppSassExtensions
+ module SassExtensions
+ module Functions
+ module Utils
+ # Returns a background-image property for a specified images for the theme
+ def theme_image(theme, path, without_url = false, relative = false)
+ path = path.value
+ theme = theme.value
+ without_url = (without_url.class == FalseClass) ? without_url : without_url.value
+
+ relative_path = "../images/"
+
+ if relative
+ if relative.class == Sass::Script::String
+ relative_path = relative.value
+ relative = true
+ elsif relative.class == FalseClass || relative.class == TrueClass
+ relative = relative
+ else
+ relative = relative.value
+ end
+ else
+ relative = false
+ end
+
+ if relative
+ image_path = File.join(relative_path, theme, path)
+ else
+ # this needs to override the default impl by checking for images at the $images_dir
+ # location
+ images_path = File.join($images_dir)
+ image_path = File.join(images_path, path)
+ end
+
+ if !without_url
+ url = "url('#{image_path}')"
+ else
+ url = "#{image_path}"
+ end
+
+ Sass::Script::String.new(url)
+ end
+ end
+ end
+ end
+end
+
+module Sass::Script::Functions
+ include AppSassExtensions::SassExtensions::Functions::Utils
+end
View
12 ExtReddit/packages/default/slice-src/custom.js
@@ -0,0 +1,12 @@
+/*
+ * This file is generated as a starting point by Sencha Cmd - it will not be replaced or
+ * updated by "sencha package upgrade".
+ *
+ * This file can be removed and the script tag in theme.html removed if this theme does
+ * not need custom additional manifest or shortcut entries. These are documented in
+ * ./packages/ext-theme-base/sass/example/render.js.
+ */
+
+//Ext.theme.addManifest();
+
+//Ext.theme.addShortcuts();
View
193 ExtReddit/packages/default/slice-src/manifest.js
@@ -0,0 +1,193 @@
+/*
+ * This file defines the core framework "manifest". These are the components and ui's
+ * common to all themes.
+ *
+ * To add more components or ui's to a derived theme, call Ext.theme.addManifest in a
+ * theme-specific file and script tag that file in to that theme's 'theme.html' file.
+ */
+Ext.theme.addManifest(
+ {
+ xtype: 'widget.menu',
+ folder: 'menu',
+ stretch: 'bottom',
+ delegate: '.' + Ext.baseCSSPrefix + 'menu-item-link',
+ filename: 'menu-item-active',
+ config: {
+ floating: false,
+ width: 200,
+ items: [
+ {
+ text: 'test',
+ cls: Ext.baseCSSPrefix + 'menu-item-active'
+ }
+ ]
+ }
+ },
+
+ {
+ xtype: 'widget.button',
+ ui: 'default'
+ },
+
+ {
+ xtype: 'widget.toolbar',
+ ui: 'default'
+ },
+
+ {
+ xtype: 'widget.panel',
+ ui: 'default'
+ },
+
+ {
+ xtype: 'widget.header',
+ ui: 'default'
+ },
+
+ {
+ xtype: 'widget.window',
+ ui: 'default'
+ },
+
+ {
+ xtype: 'widget.tab',
+ ui: 'default'
+ },
+
+ {
+ xtype: 'widget.progressbar',
+ ui: 'default'
+ },
+
+ {
+ xtype: 'widget.buttongroup',
+ ui: 'default'
+ },
+
+ //tips
+ {
+ xtype: 'widget.tooltip',
+ filename: 'tip',
+ ui: 'default'
+ },
+ {
+ xtype: 'widget.tooltip',
+ ui: 'default',
+ filename: 'form-invalid-tip',
+ config: {
+ baseCls: Ext.baseCSSPrefix + 'form-invalid-tip'
+ }
+ },
+
+ /**
+ * Grid column header backgrounds
+ */
+ {
+ xtype: 'widget.gridcolumn',
+ folder: 'grid',
+ filename: 'column-header',
+ stretch: 'bottom',
+ config: {
+ text: 'test',
+ afterRender: function() {
+ var me = this,
+ el = me.el;
+
+ el.addCls(Ext.baseCSSPrefix + 'column-header-align-' + me.align).addClsOnOver(me.overCls);
+
+ el.setStyle({
+ position: 'relative'
+ });
+ }
+ }
+ },
+ {
+ xtype: 'widget.gridcolumn',
+ folder: 'grid',
+ filename: 'column-header-over',
+ stretch: 'bottom',
+ config: {
+ text: 'test',
+ afterRender: function() {
+ var me = this,
+ el = me.el;
+
+ el.addCls(Ext.baseCSSPrefix + 'column-header-align-' + me.align).addClsOnOver(me.overCls);
+
+ el.setStyle({
+ position: 'relative'
+ });
+ el.addCls(Ext.baseCSSPrefix + 'column-header-over');
+ }
+ }
+ },
+
+ /**
+ * Grid special cell background
+ */
+ // {
+ // xtype: 'widget.gridpanel',
+ // folder: 'grid',
+ // filename: 'cell-special',
+ // delegate: '.' + Ext.baseCSSPrefix + 'grid-cell-special',
+ // config: {
+ // selModel: Ext.create('Ext.selection.CheckboxModel'),
+ // store: Ext.create('Ext.data.ArrayStore', {
+ // fields: ['text'],
+ // data: [['my text']]
+ // }),
+ // columns: [
+ // {
+ // text: 'Title',
+ // flex: 1,
+ // dataIndex: 'text'
+ // }
+ // ],
+ // width: 400,
+ // height: 100,
+ // title: 'Panel'
+ // }
+ // },
+ // {
+ // xtype: 'widget.gridpanel',
+ // folder: 'grid',
+ // filename: 'cell-special-selected',
+ // delegate: '.' + Ext.baseCSSPrefix + 'grid-cell-special',
+ // cls: 'x-grid-row-selected',
+ // config: {
+ // selModel: Ext.create('Ext.selection.CheckboxModel'),
+ // store: Ext.create('Ext.data.ArrayStore', {
+ // fields: ['text'],
+ // data: [['my text']]
+ // }),
+ // columns: [
+ // {
+ // text: 'Title',
+ // flex: 1,
+ // dataIndex: 'text'
+ // }
+ // ],
+ // width: 400,
+ // height: 100,
+ // title: 'Panel'
+ // }
+ // },
+
+ /**
+ * DatePicker
+ */
+ {
+ xtype: 'widget.datepicker',
+ folder: 'datepicker',
+ filename: 'datepicker-header',
+ stretch: 'bottom',
+ delegate: '.' + Ext.baseCSSPrefix + 'datepicker-header'
+ },
+ {
+ xtype: 'widget.datepicker',
+ folder: 'datepicker',
+ filename: 'datepicker-footer',
+ stretch: "bottom",
+ delegate: '.' + Ext.baseCSSPrefix + 'datepicker-footer'
+ }
+);
View
441 ExtReddit/packages/default/slice-src/render.js
@@ -0,0 +1,441 @@
+/*
+ * This file is generated by Sencha Cmd and should NOT be edited. It will be replaced
+ * during an upgrade.
+ */
+Ext.require([
+ '*'
+]);
+
+widgetSlices = window['widgetSlices'] || {};
+
+Ext.theme = {
+ /**
+ * The array of all component manifests. These objects have the following set of
+ * properties recognized by the slicer:
+ * @private
+ */
+ _manifest: [],
+
+ /**
+ * The collection of shortcuts for a given alias (e.g., 'widget.panel'). This is an
+ * object keyed by alias whose values are arrays of shortcut definitions.
+ * @private
+ */
+ _shortcuts: {},
+
+ /**
+ * Adds one ore more component entries to the theme manifest. These entries will be
+ * instantiated by the `Ext.theme.render` method when the page is ready.
+ *
+ * Usage:
+ *
+ * Ext.theme.addManifest({
+ * xtype: 'widget.menu',
+ * folder: 'menu',
+ * delegate: '.x-menu-item-link',
+ * filename: 'menu-item-active',
+ * config: {
+ * floating: false,
+ * width: 200,
+ * items: [{
+ * text: 'test',
+ * cls: 'x-menu-item-active'
+ * }]
+ * }
+ * },{
+ * //...
+ * });
+ *
+ * @param manifest {Object} An object with type of component, slicing information and
+ * component configuration. If this parameter is an array, each element is treated as
+ * a manifest entry. Otherwise, each argument passed is treated as a manifest entry.
+ *
+ * @param manifest.xtype {String} The xtype ('grid') or alias ('widget.grid'). This
+ * is used to specify the type of component to create as well as a potential key to
+ * any `shortcuts` defined for the xtype.
+ *
+ * @param manifest.config {Object} The component configuration object. The properties
+ * of this depend on the `xtype` of the component.
+ *
+ * @param [manifest.delegate] {String} The DOM query to use to select the element to
+ * slice. The default is to slice the primary element of the component.
+ *
+ * @param [manifest.parentCls] An optional CSS class to add to the parent of the
+ * component.
+ *
+ * @param [manifest.setup] {Function} An optional function to be called to initialize
+ * the component.
+ * @param manifest.setup.component {Ext.Component} The component instance
+ * @param manifest.setup.container {Element} The component's container.
+ *
+ * @param [manifest.folder] {String} The folder in to which to produce image slices.
+ * Only applies to Ext JS 4.1 (removed in 4.2).
+ *
+ * @param [manifest.filename] {String} The base filename for slices.
+ * Only applies to Ext JS 4.1 (removed in 4.2).
+ *
+ * @param [manifest.reverse] {Boolean} True to position the slices for linear gradient
+ * background at then opposite "end" (right or bottom) and apply the stretch to the
+ * area before it (left or top). Only applies to Ext JS 4.1 (removed in 4.2).
+ */
+ addManifest: function (manifest) {
+ var all = Ext.theme._manifest;
+ var add = Ext.isArray(manifest) ? manifest : arguments;
+
+ for (var i = 0, n = add.length; i < n; ++i) {
+ all.push(add[i]);
+ }
+ },
+
+ /**
+ * Adds one or more shortcuts to the rendering process. A `shortcut` is an object that
+ * looks the same as a `manifest` entry. These are combined by copying the properties
+ * from the shortcut over those of the manifest entry. In basic terms:
+ *
+ * var config = Ext.apply(Ext.apply({}, manfiest.config), shortcut.config);
+ * var entry = Ext.apply(Ext.apply({}, manfiest), shortcut);
+ * entry.config = config;
+ *
+ * This is not exactly the process, but the idea is the same. The difference is that
+ * the `ui` of the manifest entry is used to replace any `"{ui}"` substrings found in
+ * any string properties of the shortcut or its `config` object.
+ *
+ * Usage:
+ *
+ * Ext.theme.addShortcuts({
+ * 'widget.foo': [{
+ * config: {
+ * }
+ * },{
+ * config: {
+ * }
+ * }],
+ *
+ * 'widget.bar': [ ... ]
+ * });
+ */
+ addShortcuts: function (shortcuts) {
+ var all = Ext.theme._shortcuts;
+
+ for (var key in shortcuts) {
+ var add = shortcuts[key];
+ var xtype = Ext.theme.addWidget(key);
+ var existing = all[xtype];
+
+ if (!existing) {
+ all[xtype] = existing = [];
+ }
+
+ existing.push.apply(existing, add);
+ }
+ },
+
+ /**
+ * This method ensures that a given string has the specified prefix (e.g., "widget.").
+ * @private
+ */
+ addPrefix: function (prefix, s) {
+ if (!s || (s.length > prefix.length && s.substring(0,prefix.length) === prefix)) {
+ return s;
+ }
+ return prefix + s;
+ },
+
+ /**
+ * This method returns the given string with "widget." added to the front if that is
+ * not already present.
+ * @private
+ */
+ addWidget: function (str) {
+ return Ext.theme.addPrefix('widget.', str);
+ },
+
+ /**
+ * This method accepts an manifest entry and a shortcut entry and returns the merged
+ * version.
+ * @private
+ */
+ applyShortcut: function (manifestEntry, shortcut) {
+ var ui = manifestEntry.ui;
+ var config = Ext.theme.copyProps({}, manifestEntry.config);
+ var entry = Ext.theme.copyProps({}, manifestEntry);
+
+ if (ui && !config.ui) {
+ config.ui = ui;
+ }
+ if (shortcut) {
+ var tpl = { ui: ui };
+ Ext.theme.copyProps(entry, shortcut, tpl);
+ Ext.theme.copyProps(config, shortcut.config, tpl);
+ }
+
+ entry.xtype = Ext.theme.addWidget(entry.xtype);
+ entry.config = config; // both guys have "config" so smash merged one on now...
+ return entry;
+ },
+
+ /**
+ * This method copies property from a `src` object to a `dest` object and reaplces
+ * `"{foo}"` fragments of any string properties as defined in the `tpl` object.
+ *
+ * var obj = Ext.theme.copyProps({}, {
+ * foo: 'Hello-{ui}'
+ * }, {
+ * ui: 'World'
+ * });
+ *
+ * console.log('obj.foo: ' + obj.foo); // logs "Hello-World"
+ *
+ * @return {Object} The `dest` object or a new object (if `dest` was null).
+ * @private
+ */
+ copyProps: function (dest, src, tpl) {
+ var out = dest || {};
+ var replacements = [];
+ var token;
+
+ if (src) {
+ if (tpl) {
+ for (token in tpl) {
+ replacements.push({
+ re: new RegExp('\\{' + token + '\\}', 'g'),
+ value: tpl[token]
+ });
+ }
+ }
+
+ for (var key in src) {
+ var val = src[key];
+ if (tpl && typeof val === 'string') {
+ for (var i = 0; i < replacements.length; ++ i) {
+ val = val.replace(replacements[i].re, replacements[i].value);
+ }
+ }
+ out[key] = val;
+ }
+ }
+
+ return out;
+ },
+
+ /**
+ * Renders a component given its manifest and shortcut entries.
+ * @private
+ */
+ renderWidget: function (manifestEntry, shortcut) {
+ var entry = Ext.theme.applyShortcut(manifestEntry, shortcut);
+ var config = entry.config;
+ var widget = Ext.create(entry.xtype, config);
+ var ct = Ext.fly(document.body).createChild({ cls: 'widget-container' });
+
+ Ext.theme.currentWidget = widget;
+
+ if (widget.floating === true) {
+ widget.floating = { shadow: false };
+ }
+ if (widget.floating) {
+ widget.focusOnToFront = false;
+ }
+
+ if (entry.setup) {
+ entry.setup.call(widget, widget, ct);
+ } else {
+ widget.render(ct);
+ if (widget.floating) {
+ widget.showAt(0, 0);
+ ct.setHeight(widget.getHeight());
+ }
+ }
+
+ var el = widget.el;
+ if (entry.delegate) {
+ el = el.down(entry.delegate);
+ }
+
+ el.addCls('x-slicer-target'); // this is what generateSlicerManifest looks for
+
+ if (entry.over) {
+ widget.addOverCls();
+ }
+ if (config.parentCls) {
+ el.parent().addCls(config.parentCls);
+ }
+
+ if (Ext.theme.legacy) {
+ // The 4.1 approach has some interesting extra pieces
+ //
+ var data = {};
+ if (entry.reverse) {
+ data.reverse = true;
+ }
+ if (entry.filename) {
+ data.filename = entry.filename;
+ }
+ if (entry.folder) {
+ data.folder = entry.folder;
+ }
+ if (entry.offsets) {
+ data.offsets = entry.offsets;
+ }
+
+ Ext.theme.setData(el.dom, data);
+
+ widget.extras = data;
+
+ Ext.theme.captureWidgetSliceData(el, widget, entry);
+ }
+
+ Ext.theme.currentWidget = null;
+ },
+
+
+ captureWidgetSliceData: function(el, widget, entry) {
+ var elId = el.id,
+ folder = entry.folder || widget.baseCls,
+ prefix = Ext.baseCSSPrefix,
+ file;
+
+ if(!entry.filename) {
+ return;
+ }
+
+ if(folder.indexOf(prefix) === 0) {
+ folder = folder.substring(prefix.length);
+ }
+
+ file = folder + "/" + entry.filename;
+
+ var sliceData = {
+ stretch: entry.stretch || 'bottom',
+ slices: {
+ "frame_bg": file + "-bg.gif",
+ "corners": file + "-corners.gif",
+ "sides": file + "-sides.gif"
+ }
+ };
+
+ if(widget.extras) {
+ sliceData.extras = widget.extras;
+ }
+
+ widgetSlices[elId] = sliceData;
+ },
+
+ /**
+ * Renders all of the components that have been added to the manifest.
+ * @private
+ */
+ render: function () {
+ var manifest = Ext.theme._manifest;
+ var shortcuts = Ext.theme._shortcuts;
+
+ for (var k = 0, n = manifest ? manifest.length : 0; k < n; ++k) {
+ var manifestEntry = manifest[k];
+ var xtype = Ext.theme.addWidget(manifestEntry.xtype);
+ var widgetShortcuts = xtype ? shortcuts[xtype] : null;
+
+ if (xtype && manifestEntry.ui && widgetShortcuts) {
+ for (var i = 0; i < widgetShortcuts.length; i++) {
+ Ext.theme.renderWidget(manifestEntry, widgetShortcuts[i]);
+ }
+ } else {
+ Ext.theme.renderWidget(manifestEntry);
+ }
+ }
+ },
+
+ /**
+ * Renders all components (see `render`) and notifies the Slicer that things are ready.
+ * @private
+ */
+ run: function () {
+ var extjsVer = Ext.versions.extjs;
+ var globalData = {};
+
+ if (Ext.layout.Context) {
+ Ext.override(Ext.layout.Context, {
+ run: function () {
+ var ok = this.callParent(),
+ widget = Ext.theme.currentWidget;
+ if (!ok && widget) {
+ Ext.Error.raise("Layout run failed: " + widget.id);
+ }
+ return ok;
+ }
+ });
+ }
+
+ // Previous to Ext JS 4.2, themes and their manifests where defined differently.
+ // So pass this along if we are hosting a pre-4.2 theme.
+ //
+ if (extjsVer && extjsVer.isLessThan(new Ext.Version("4.2"))) {
+ globalData.format = "1.0"; // tell the Slicer tool
+ Ext.theme.legacy = true; // not for our own data collection
+
+ // Check for the Cmd3.0/ExtJS4.1 variables:
+ //
+ if (Ext.manifest && Ext.manifest.widgets) {
+ Ext.theme.addManifest(Ext.manifest.widgets);
+ }
+ if (Ext.shortcuts) {
+ Ext.theme.addShortcuts(Ext.shortcuts);
+ }
+ if (Ext.userManifest && Ext.userManifest.widgets) {
+ Ext.theme.addManifest(Ext.userManifest.widgets);
+ }
+ }
+
+ Ext.theme.setData(document.body, globalData);
+
+ Ext.theme.render();
+
+ // This function is defined by slicer.js (the framework-independent piece)
+ Ext.defer(function() {window.widgetsReady = true}, 1);
+ },
+
+ /**
+ * Sets the `data-slicer` attribute to the JSON-encoded value of the provided data.
+ * @private
+ */
+ setData: function (el, data) {
+ if (data) {
+ var json = Ext.encode(data);
+ if (json !== '{}') {
+ el.setAttribute('data-slicer', json);
+ }
+ }
+ },
+
+ /**
+ * This used to be `loadExtStylesheet`.
+ * @private
+ */
+ loadCss: function (src, callback) {
+ var xhr = new XMLHttpRequest();
+
+ xhr.open('GET', src);
+
+ xhr.onload = function() {
+ var css = xhr.responseText,
+ head = document.getElementsByTagName('head')[0],
+ style = document.createElement('style');
+
+ // There's bugginess in the next gradient syntax in WebKit r84622
+ // This might be fixed in a later WebKit, but for now we're going to
+ // strip it out here since compass generates it.
+ //
+ // TODO: Upgrade to later WebKit revision
+ css = css.replace(/background(-image)?: ?-webkit-linear-gradient(?:.*?);/g, '');
+
+ style.type = 'text/css';
+ style.innerText = css;
+
+ head.appendChild(style);
+ callback();
+ };
+
+ xhr.send(null);
+ }
+};
+
+Ext.onReady(Ext.theme.run, Ext.theme);
View
835 ExtReddit/packages/default/slice-src/shortcuts.js
@@ -0,0 +1,835 @@
+/*
+ * This file defines the core framework "shortcuts". These are the modes and states of the
+ * various components keyed by their xtype.
+ *
+ * To add more shortcuts for an xtype to a derived theme, call Ext.theme.addShortcuts in
+ * a theme-specific file and script tag that file in to that theme's 'theme.html' file.
+ */
+Ext.theme.addShortcuts({
+ 'tooltip': [{
+ setup: function(component, ct) {
+ component.render(Ext.getBody());
+ component.showBy(ct);
+ ct.setHeight(component.getHeight());
+ ct.dom.appendChild(component.el.dom);
+ component.el.setLeft(0);
+ component.el.setTop(0);
+ },
+ config: {
+ width: 100,
+ height: 40,
+ shadow: false,
+ hide: function(){}
+ }
+ }],
+
+ 'widget.buttongroup': [
+ {
+ folder: 'btn-group',
+ filename: 'btn-group-{ui}-framed-notitle',
+ config: {
+ columns: 2,
+ defaults: {
+ scale: 'small'
+ },
+ items: [{
+ xtype:'splitbutton',
+ text: 'Menu Button',
+ iconCls: 'add16',
+ menu: [{text: 'Menu Item 1'}]
+ },{
+ xtype:'splitbutton',
+ text: 'Cut',
+ iconCls: 'add16',
+ menu: [{text: 'Cut Menu Item'}]
+ },{
+ text: 'Copy',
+ iconCls: 'add16'
+ },{
+ text: 'Paste',
+ iconCls: 'add16',
+ menu: [{text: 'Paste Menu Item'}]
+ },{
+ text: 'Format',
+ iconCls: 'add16'
+ }]
+ }
+ },
+ {
+ folder: 'btn-group',
+ filename: 'btn-group-{ui}-framed',
+ config: {
+ columns: 2,
+ title: 'Manifest',
+ defaults: {
+ scale: 'small'
+ },
+ items: [{
+ xtype:'splitbutton',
+ text: 'Menu Button',
+ iconCls: 'add16',
+ menu: [{text: 'Menu Item 1'}]
+ },{
+ xtype:'splitbutton',
+ text: 'Cut',
+ iconCls: 'add16',
+ menu: [{text: 'Cut Menu Item'}]
+ },{
+ text: 'Copy',
+ iconCls: 'add16'
+ },{
+ text: 'Paste',
+ iconCls: 'add16',
+ menu: [{text: 'Paste Menu Item'}]
+ },{
+ text: 'Format',
+ iconCls: 'add16'
+ }]
+ }
+ }
+ ],
+
+ 'widget.progressbar': [
+ {
+ xtype: 'widget.progressbar',
+ folder: 'progress',
+ filename: 'progress-{ui}',
+ delegate: '.' + Ext.baseCSSPrefix + 'progress-bar',
+ config: {
+ width: 100,
+ value: 1,
+ animate: false
+ }
+ }
+ ],
+
+ 'widget.tab': [
+ {
+ xtype: 'widget.tabpanel',
+ filename: 'tabpanel-{ui}',
+ stretch: 'bottom',
+ config: {
+ height: 200,
+ width: 200,
+ items: [{
+ title: 'Tab 1',
+ html: 'test'
+ }, {
+ title: 'Tab 2',
+ html: 'test'
+ }]
+ }
+ },
+ {
+ xtype: 'widget.tabpanel',
+ filename: 'tab-bar-{ui}',
+ folder: 'tab-bar',
+ delegate: '.' + Ext.baseCSSPrefix + 'tab-bar',
+ stretch: 'bottom',
+ offsets: {
+ bottom: 3,
+ left: 1
+ },
+ config: {
+ dock: 'top',
+ items: [{
+ text: 'Tab 1'
+ }],
+ width: 300,
+ listeners: {
+ afterRender: function(comp) {
+ comp.el.down('.' + Ext.baseCSSPrefix + 'tab-bar-body')
+ .setStyle("visibility", "hidden");
+ comp.el.down('.' + Ext.baseCSSPrefix + 'tab-bar-strip')
+ .setStyle("visibility", "hidden");
+ comp.el.down('.' + Ext.baseCSSPrefix + 'panel-body')
+ .setStyle("visibility", "hidden");
+ }
+ }
+ }
+ },
+ {
+ filename: 'tab-{ui}-top',
+ stretch: 'bottom',
+ config: {
+ text: 'Normal Top Tab',
+ closable: false
+ }
+ },
+ {
+ filename: 'tab-{ui}-top-active',
+ stretch: 'bottom',
+ config: {
+ text: 'Active Top Tab',
+ active: true,
+ closable: false
+ }
+ },
+ {
+ filename: 'tab-{ui}-top-over',
+ over: true,
+ stretch: 'bottom',
+ config: {
+ text: 'Over Top Tab',
+ closable: false
+ }
+ },
+ {
+ filename: 'tab-{ui}-top-disabled',
+ stretch: 'bottom',
+ config: {
+ text: 'Disabled Top Tab',
+ closable: false,
+ disabled: true
+ }
+ },
+ {
+ filename: 'tab-{ui}-bottom',
+ stretch: 'bottom',
+ config: {
+ text: 'Normal Bottom Tab',
+ position: 'bottom',
+ closable: false
+ }
+ },
+ {
+ filename: 'tab-{ui}-bottom-active',
+ stretch: 'bottom',
+ config: {
+ text: 'Active Bottom Tab',
+ position: 'bottom',
+ active: true,
+ closable: false
+ }
+ },
+ {
+ filename: 'tab-{ui}-bottom-over',
+ over: true,
+ stretch: 'bottom',
+ config: {
+ text: 'Over Bottom Tab',
+ position: 'bottom',
+ closable: false
+ }
+ },
+ {
+ filename: 'tab-{ui}-bottom-disabled',
+ stretch: 'bottom',
+ config: {
+ text: 'Disabled Bottom Tab',
+ position: 'bottom',
+ closable: false,
+ disabled: true
+ }
+ }
+ ],
+
+ 'widget.window': [
+ // Floating
+ {
+ filename: 'window-{ui}',
+ title: 'Window',
+ config: {
+ closable: false,
+ height: 200,
+ width: 200,
+ fbar: {
+ items: [{
+ text: 'Submit'
+ }]
+ },
+ tbar: {
+ items: [{
+ text: 'Button'
+ }]
+ }
+ }
+ },
+ // window w/header
+ {
+ stretch: 'bottom',
+ filename: 'window-header-{ui}-top',
+ folder: 'window-header',
+ delegate: '.' + Ext.baseCSSPrefix + 'window-header',
+ config: {
+ title: 'Top Window',
+ closable: false,
+ width: 200,
+ html: '&#160;',
+ headerPosition: 'top'
+ }
+ },
+ {
+ stretch: 'top',
+ filename: 'window-header-{ui}-bottom',
+ folder: 'window-header',
+ delegate: '.' + Ext.baseCSSPrefix + 'window-header',
+ config: {
+ title: 'Bottom Window',
+ closable: false,
+ width: 200,
+ html: '&#160;',
+ headerPosition: 'bottom'
+ }
+ },
+ {
+ stretch: 'right',
+ filename: 'window-header-{ui}-left',
+ folder: 'window-header',
+ delegate: '.' + Ext.baseCSSPrefix + 'window-header',
+ config: {
+ title: 'Left Window',
+ closable: false,
+ height: 200,
+ width: 200,
+ headerPosition: 'left'
+ }
+ },
+ {
+ stretch: 'left',
+ filename: 'window-header-{ui}-right',
+ folder: 'window-header',
+ delegate: '.' + Ext.baseCSSPrefix + 'window-header',
+ config: {
+ title: 'Right Window',
+ closable: false,
+ height: 200,
+ width: 200,
+ headerPosition: 'right'
+ }
+ },
+ // collapsed window w/header
+ {
+ stretch: 'bottom',
+ filename: 'window-header-{ui}-collapsed-top',
+ folder: 'window-header',
+ delegate: '.' + Ext.baseCSSPrefix + 'window-header',
+ config: {
+ title: 'Top Collapsed',
+ collapsed: true,
+ closable: false,
+ expandOnShow: false,
+ width: 200,
+ headerPosition: 'top'
+ }
+ },
+ {
+ stretch: 'top',
+ filename: 'window-header-{ui}-collapsed-bottom',
+ folder: 'window-header',
+ delegate: '.' + Ext.baseCSSPrefix + 'window-header',
+ config: {
+ title: 'Bottom Collapsed',
+ collapsed: true,
+ closable: false,
+ expandOnShow: false,
+ width: 200,
+ headerPosition: 'bottom'
+ }
+ },
+ {
+ stretch: 'right',
+ filename: 'window-header-{ui}-collapsed-left',
+ folder: 'window-header',
+ delegate: '.' + Ext.baseCSSPrefix + 'window-header',
+ config: {
+ title: 'Left Collapsed',
+ collapsed: true,
+ closable: false,
+ expandOnShow: false,
+ height: 200,
+ width: 200,
+ headerPosition: 'left'
+ }
+ },
+ {
+ stretch: 'left',
+ filename: 'window-header-{ui}-collapsed-right',
+ folder: 'window-header',
+ delegate: '.' + Ext.baseCSSPrefix + 'window-header',
+ config: {
+ title: 'Right Collapsed',
+ collapsed: true,
+ closable: false,
+ expandOnShow: false,
+ height: 200,
+ width: 200,
+ headerPosition: 'right'
+ }
+ }
+ ], // window
+
+ 'widget.panel': [
+ {
+ config: {
+ width: 200,
+ frame: true,
+ html: 'Framed panel'
+ }
+ },
+ // panel w/header
+ {
+ stretch: 'bottom',
+ folder: 'panel-header',
+ filename: 'panel-header-{ui}-top',
+ delegate: '.' + Ext.baseCSSPrefix + 'panel-header',
+ config: {
+ title: 'Top',
+ width: 200,
+ html: '&#160;',
+ headerPosition: 'top'
+ }
+ },
+ {
+ stretch: 'top',
+ folder: 'panel-header',
+ filename: 'panel-header-{ui}-bottom',
+ delegate: '.' + Ext.baseCSSPrefix + 'panel-header',
+ config: {
+ title: 'Bottom',
+ width: 200,
+ html: '&#160;',
+ headerPosition: 'bottom'
+ }
+ },
+ {
+ stretch: 'right',
+ folder: 'panel-header',
+ filename: 'panel-header-{ui}-left',
+ delegate: '.' + Ext.baseCSSPrefix + 'panel-header',
+ config: {
+ title: 'Left',
+ height: 200,
+ width: 200,
+ headerPosition: 'left'
+ }
+ },
+ {
+ stretch: 'left',
+ folder: 'panel-header',
+ filename: 'panel-header-{ui}-right',
+ delegate: '.' + Ext.baseCSSPrefix + 'panel-header',
+ config: {
+ title: 'Right',
+ height: 200,
+ width: 200,
+ headerPosition: 'right'
+ }
+ },
+ // framed panel w/header
+ {
+ stretch: 'bottom',
+ folder: 'panel-header',
+ filename: 'panel-header-{ui}-framed-top',
+ delegate: '.' + Ext.baseCSSPrefix + 'panel-header',
+ config: {
+ title: 'Top Framed',
+ width: 200,
+ frame: true,
+ html: '&#160;',
+ headerPosition: 'top'
+ }
+ },
+ {
+ stretch: 'top',
+ folder: 'panel-header',
+ filename: 'panel-header-{ui}-framed-bottom',
+ delegate: '.' + Ext.baseCSSPrefix + 'panel-header',
+ config: {
+ title: 'Bottom Framed',
+ width: 200,
+ frame: true,
+ html: '&#160;',
+ headerPosition: 'bottom'
+ }
+ },
+ {
+ stretch: 'right',
+ folder: 'panel-header',
+ filename: 'panel-header-{ui}-framed-left',
+ delegate: '.' + Ext.baseCSSPrefix + 'panel-header',
+ config: {
+ title: 'Left Framed',
+ height: 200,
+ width: 200,
+ frame: true,
+ headerPosition: 'left'
+ }
+ },
+ {
+ stretch: 'left',
+ folder: 'panel-header',
+ filename: 'panel-header-{ui}-framed-right',
+ delegate: '.' + Ext.baseCSSPrefix + 'panel-header',
+ config: {
+ title: 'Right Framed',
+ height: 200,
+ width: 200,
+ frame: true,
+ headerPosition: 'right'
+ }
+ },
+ // collapsed framed panel w/header
+ {
+ stretch: 'bottom',
+ folder: 'panel-header',
+ filename: 'panel-header-{ui}-framed-collapsed-top',
+ delegate: '.' + Ext.baseCSSPrefix + 'panel-header',
+ config: {
+ title: 'Top Framed/Collapsed',
+ collapsed: true,
+ width: 200,
+ frame: true,
+ headerPosition: 'top'
+ }
+ },
+ {
+ stretch: 'top',
+ folder: 'panel-header',
+ filename: 'panel-header-{ui}-framed-collapsed-bottom',
+ delegate: '.' + Ext.baseCSSPrefix + 'panel-header',
+ config: {
+ title: 'Bottom Framed/Collapsed',
+ collapsed: true,
+ width: 200,
+ frame: true,
+ headerPosition: 'bottom'
+ }
+ },
+ {
+ stretch: 'right',
+ folder: 'panel-header',
+ filename: 'panel-header-{ui}-framed-collapsed-left',
+ delegate: '.' + Ext.baseCSSPrefix + 'panel-header',
+ config: {
+ title: 'Left Framed/Collapsed',
+ collapsed: true,
+ height: 200,
+ width: 200,
+ frame: true,
+ headerPosition: 'left'
+ }
+ },
+ {
+ stretch: 'left',
+ folder: 'panel-header',
+ filename: 'panel-header-{ui}-framed-collapsed-right',
+ delegate: '.' + Ext.baseCSSPrefix + 'panel-header',
+ config: {
+ title: 'Right Framed/Collapsed',
+ collapsed: true,
+ height: 200,
+ width: 200,
+ frame: true,
+ headerPosition: 'right'
+ }
+ }
+ ],
+
+ 'widget.toolbar': [
+ {
+ filename: 'toolbar-{ui}',
+ stretch: 'bottom',
+ config: {
+ width: 200,
+ items: [{
+ text: 'test'
+ }]
+ }
+ }
+ ],
+
+ 'widget.button': [
+ //small button
+ {
+ stretch: 'bottom',
+ filename: 'btn-{ui}-small',
+ config: {
+ scale: 'small',
+ text: 'Button'
+ }
+ },
+ {
+ filename: 'btn-{ui}-small-over',
+ stretch: 'bottom',
+ over: true,
+ config: {
+ scale: 'small',
+ text: 'Button'
+ }
+ },
+ {
+ filename: 'btn-{ui}-small-focus',
+ stretch: 'bottom',
+ config: {
+ scale: 'small',
+ text: 'Button',
+ cls: Ext.baseCSSPrefix + 'btn-{ui}-small-focus'
+ }
+ },
+ {
+ filename: 'btn-{ui}-small-pressed',
+ stretch: 'bottom',
+ config: {
+ scale: 'small',
+ text: 'Button',
+ cls: Ext.baseCSSPrefix + 'btn-{ui}-small-pressed'
+ }
+ },
+ {
+ filename: 'btn-{ui}-small-disabled',
+ stretch: 'bottom',
+ config: {
+ scale: 'small',
+ text: 'Button',
+ disabled: true
+ }
+ },
+
+ //medium button
+ {
+ stretch: 'bottom',
+ filename: 'btn-{ui}-medium',
+ config: {
+ scale: 'medium',
+ text: 'Button'
+ }
+ },
+ {
+ stretch: 'bottom',
+ filename: 'btn-{ui}-medium-over',
+ over: true,
+ config: {
+ scale: 'medium',
+ text: 'Button'
+ }
+ },
+ {
+ stretch: 'bottom',