Permalink
Browse files

Initial commit.

  • Loading branch information...
0 parents commit 2f77968922270256c212ae07e6077c5e1aa17a01 @arthurakay arthurakay committed Jun 25, 2012
Showing 5,344 changed files with 2,028,789 additions and 0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
@@ -0,0 +1,2 @@
+.DS_Store
+.idea/
0 README
No changes.
12 app.js
@@ -0,0 +1,12 @@
+Ext.Loader.setConfig({
+ enabled: true
+});
+
+Ext.application({
+ autoCreateViewport: true,
+ name: 'ChicagoMeetup',
+
+ requires : [
+ 'ChicagoMeetup.MeetupApiUtil'
+ ]
+});
@@ -0,0 +1,75 @@
+Ext.define('ChicagoMeetup.MeetupApiUtil', {
+ singleton : true,
+
+ /**
+ *
+ */
+ apiKey : '26707c51352322312176e2f42502d3c',
+
+ /**
+ *
+ */
+ groupId : 'Chicago-Sencha-User-Group',
+
+ /**
+ *
+ * @param eventId
+ * @return {String}
+ */
+ getUsersUrl : function (eventId) {
+ var queryString = Ext.Object.toQueryString({
+ sign : true,
+ key : this.apiKey,
+ event_id : eventId,
+ order : 'event',
+ rsvp : 'yes',
+ format : 'json',
+ page : 200
+ });
+
+ return 'http://api.meetup.com/2/rsvps?' + queryString;
+ },
+
+ /* JSLint should tell us it doesn't like this method... */
+ dummyMethod : function() {
+ var test = 0;
+
+ if (test) { return true; }
+ else { return false; } // <-- specifically this line...
+ },
+
+ /**
+ *
+ * @return {String}
+ */
+ getPastEventsUrl : function () {
+ var queryString = Ext.Object.toQueryString({
+ sign : true,
+ key : this.apiKey,
+ group_urlname : this.groupId,
+ format : 'json',
+ page : 200,
+ before : '-1d',
+ after : '-12m'
+ });
+
+ return 'http://api.meetup.com/events?' + queryString;
+ },
+
+ /**
+ *
+ * @return {String}
+ */
+ getUpcomingEventsUrl : function () {
+ var queryString = Ext.Object.toQueryString({
+ sign : true,
+ key : this.apiKey,
+ group_urlname : this.groupId,
+ format : 'json',
+ page : 200,
+ before : '12m'
+ });
+
+ return 'http://api.meetup.com/events?' + queryString;
+ }
+});
@@ -0,0 +1,36 @@
+Ext.define('ChicagoMeetup.model.Event', {
+ extend : 'Ext.data.Model',
+
+ fields : [
+ {
+ name : 'id',
+ type : 'string',
+ mapping : 'id'
+ },
+ {
+ name : 'name',
+ type : 'string',
+ mapping : 'name'
+ },
+ {
+ name : 'date',
+ type : 'date',
+ mapping : 'time'
+ },
+ {
+ name : 'rsvps',
+ type : 'int',
+ mapping : 'rsvpcount'
+ },
+ {
+ name : 'url',
+ type : 'string',
+ mapping : 'event_url'
+ },
+ {
+ name : 'description',
+ type : 'string',
+ mapping : 'description'
+ }
+ ]
+});
@@ -0,0 +1,13 @@
+Ext.define('ChicagoMeetup.store.Events', {
+ extend : 'Ext.data.Store',
+
+ requires : [
+ 'ChicagoMeetup.MeetupApiUtil',
+ 'ChicagoMeetup.model.Event'
+ ],
+
+ storeId : 'EventStore',
+ autoLoad : true,
+ model : 'ChicagoMeetup.model.Event'
+
+});
@@ -0,0 +1,58 @@
+Ext.define('ChicagoMeetup.view.Events', {
+ extend : 'Ext.grid.Panel',
+ alias : 'widget.chicago-events',
+
+ requires : [
+ 'ChicagoMeetup.store.Events'
+ ],
+
+ initComponent : function () {
+ var url = this.pastEvents ?
+ ChicagoMeetup.MeetupApiUtil.getPastEventsUrl() :
+ ChicagoMeetup.MeetupApiUtil.getUpcomingEventsUrl();
+
+ Ext.applyIf(this, {
+ columns : [
+ {
+ dataIndex : 'date',
+ text : 'Date'
+ },
+ {
+ dataIndex : 'name',
+ text : 'Event Name',
+ flex : 1
+ },
+ {
+ dataIndex : 'rsvps',
+ text : 'RSVPs'
+ },
+ {
+ text : 'URL',
+ dataIndex : 'url',
+ renderer : this.linkRenderer
+ }
+ ],
+
+ store : Ext.create('ChicagoMeetup.store.Events', {
+ proxy : {
+ type : 'jsonp',
+ url : url,
+ autoAppendParams : false,
+ pageParam : undefined,
+
+ reader : {
+ type : 'json',
+ root : 'results'
+ }
+ }
+ })
+ });
+
+ this.callParent(arguments);
+ },
+
+ linkRenderer : function (value) {
+ return '<a href="' + value + '" target="_blank">Link...</a>';
+ }
+
+});
@@ -0,0 +1,29 @@
+Ext.define('ChicagoMeetup.view.Viewport', {
+ extend : 'Ext.container.Viewport',
+
+ requires : [
+ 'ChicagoMeetup.view.Events'
+ ],
+
+ items : [
+ {
+ xtype : 'tabpanel',
+ region : 'center',
+
+ title : 'Sencha Chicago Meetup Group',
+
+ items : [
+ {
+ xtype : 'chicago-events',
+ title : 'Upcoming Events'
+ },
+ {
+ xtype : 'chicago-events',
+ pastEvents : true,
+ title : 'Past Events'
+ }
+ ]
+
+ }
+ ]
+});
@@ -0,0 +1,14 @@
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <title id="page-title">ExtJS Unit Test: Sample App</title>
+
+ <link rel="stylesheet" type="text/css" href="resources/extjs-4.1.0/resources/css/ext-all.css">
+ <script type="text/javascript" src="resources/extjs-4.1.0/ext-all.js"></script>
+
+ <script type="text/javascript" src="app.js"></script>
+</head>
+<body>
+
+</body>
+</html>
@@ -0,0 +1,32 @@
+Version 1.2.1 (June 7, 2012)
+ - updates to example
+ - added changelog
+ - updated JSLINT to latest version (2012-05-09)
+
+
+Version 1.2.0 (June 6, 2012)
+ - added "filepaths" config to allow multiple paths (*** BREAKING CHANGE***)
+ - added "exclusions" config to ignore paths
+
+
+Version 1.1.0 (June 5, 2012)
+ - added logfile output (change from terminal output of errors)
+
+
+Version 1.0.3 (April 20, 2012)
+ - Updated PhantomJS to latest version (1.5.0)
+
+
+Version 1.0.2 (April 11, 2012)
+ - Updated JSLINT to latest version (2012-03-29
+
+
+Version 1.0.1 (January 13, 2012)
+ - corrected JSLINT check
+ - added license and readme
+ - added exit codes
+ - added JSLINT overrides
+
+
+Version 1.0 (November 18, 2011)
+ - Initial implementation
@@ -0,0 +1,19 @@
+Copyright (c) 2011 Arthur Kay
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is furnished
+to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
Oops, something went wrong.

0 comments on commit 2f77968

Please sign in to comment.