forked from zendesk/demo_apps
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
149 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
Copyright 2012 Zendesk | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
|
||
ADDITIONAL TERMS AND CONDITIONS | ||
|
||
Capitalized terms used herein have the meaning set forth in the | ||
Zendesk, Inc. (“Zendesk”) Terms of Service (available at www.zendesk.com/company/terms) | ||
(the “Terms”). The software made available herein constitutes the source code for a | ||
Zendesk Application (“Application Software”) which may be implemented to | ||
enable features or functionality to be utilized in connection with a subscription | ||
to the Service. Notwithstanding anything to the contrary set forth in the Terms | ||
or any other agreement by and between you and Zendesk, Application Software is | ||
provided “AS IS” and on an “AS AVAILABLE” basis, and that Zendesk makes no warranty | ||
as to the Application Software. ZENDESK DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, | ||
INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT AND THOSE ARISING FROM A COURSE | ||
OF DEALING OR USAGE OF TRADE RELATED TO THE APPLICATION SOFTWARE, ITS USE OR ANY INABILITY | ||
TO USE IT OR THE RESULTS OF ITS USE. | ||
|
||
Zendesk makes Zendesk Applications available for use through the user interface of | ||
the Service in the manner described (for each Zendesk Application) at www.zendesk.com/apps | ||
(“Service Implementation”). Use of Application Software, other than in connection with a | ||
Service Implementation is subject to the following risks and conditions: (i) the Application | ||
Software may contain errors, design flaws or other problems; and (ii) use of the Application | ||
Software may result in unexpected results, loss of data, project delays or other unpredictable | ||
damage or loss. Zendesk only supports the Application Software currently available and installed | ||
through the Service Implementation. By utilizing Application Software other than in connection | ||
with the Service Implementation, you are agreeing that Zendesk shall have no obligation to | ||
correct any bugs, defects or errors in the Application Software you have utilized or | ||
otherwise to support or maintain the Application Software you have utilized. | ||
|
||
If you elect to utilize any Application Software other than through a Service Implementation, | ||
you are agreeing to release Zendesk from any claim with regard to the Application Software, | ||
its operation, availability or its failure to operate or be available. | ||
Without limiting the generality of the foregoing, You acknowledge and agree that neither the use, | ||
availability nor operation of any Application Software shall be subject to any service level | ||
commitment applicable to the Service. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Reusable Template Sample App | ||
|
||
This very simple sample app shows you how to reuse templates in Zendesk apps. It is intended for demonstration purposes or for training purposes. | ||
|
||
### The following information is displayed: | ||
|
||
* A template that says hello, and another template that says goodbye. Both templates include a common template. | ||
* The app.activated event. | ||
* Click events. | ||
|
||
Please submit bug reports to [Zendesk Support]([email protected]). Pull requests are welcome. | ||
|
||
### Screenshot(s): | ||
|
||
![](https://cloud.githubusercontent.com/assets/5535625/4245137/522167c6-3a2f-11e4-9d44-5145511e78ab.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
(function() { | ||
|
||
return { | ||
events: { | ||
'app.activated': 'greet', | ||
'click a': 'handleButton' | ||
}, | ||
|
||
greet: function(type) { | ||
if (typeof type != 'string') { | ||
type = 'hello'; | ||
} | ||
var currentUser = this.currentUser().name(); | ||
var boilerPlate = this.renderTemplate('boilerplate', { username: currentUser }); | ||
this.switchTo(type, { | ||
heading: boilerPlate | ||
}); | ||
}, | ||
|
||
handleButton: function(e) { | ||
var nextType = e.target.classList[0]; | ||
this.greet(nextType); | ||
} | ||
|
||
}; | ||
|
||
}()); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"name": "Reusable Template App", | ||
"author": { | ||
"name": "Zendesk", | ||
"email": "[email protected]" | ||
}, | ||
"defaultLocale": "en", | ||
"private": true, | ||
"location": ["ticket_sidebar", "new_ticket_sidebar"], | ||
"frameworkVersion": "1.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<h1><strong>{{username}}</strong></h1> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{{{heading}}} | ||
<h2>{{t "goodbye.main"}} </h2> | ||
<p>{{t "goodbye.info"}}</p> | ||
<a class="hello">{{t "hello.main"}}</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{{{heading}}} | ||
<h2>{{t "hello.main"}} </h2> | ||
<p>{{t "hello.info"}}</p> | ||
<a class="goodbye">{{t "goodbye.main"}}</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<header> | ||
<span class="logo"/> | ||
<h3>{{setting "name"}}</h3> | ||
</header> | ||
<section data-main/> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"app": { | ||
"package": "reusable_template_sample", | ||
"name": { | ||
"value": "Reusable Template App", | ||
"title": "app name" | ||
}, | ||
"description": { | ||
"value": "This is the best App ever", | ||
"title": "app description" | ||
} | ||
}, | ||
"hello": { | ||
"main": { | ||
"title": "Enter a brief description of your string here", | ||
"value": "Hello" | ||
}, | ||
"info": { | ||
"title": "This view includes some boilerplate!", | ||
"value": "This view includes some boilerplate!" | ||
} | ||
}, | ||
"goodbye": { | ||
"main": { | ||
"title": "Enter a brief description of your string here", | ||
"value": "Goodbye" | ||
}, | ||
"info": { | ||
"title": "This view also includes boilerplate", | ||
"value": "This view also includes boilerplate" | ||
} | ||
} | ||
} |