This file contains hidden or 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
My test GIST record |
This file contains hidden or 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
// EXAMPLE OF FIELD VALIDATION | |
$('#request_custom_fields_23591935') | |
.focusout(function() | |
{ | |
var nameReg = /^[A-Za-z]+$/; | |
var isValid = $('#request_custom_fields_23591935') | |
.val() | |
.match(nameReg); | |
if (isValid && isValid.length > 0) | |
{ |
This file contains hidden or 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
/* | |
inspired from this sources https://jqueryui.com/autocomplete/#xml | |
*/ | |
$(function() { | |
var mydata = []; |
This file contains hidden or 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
// EXAMPLE OF FIELD VALIDATION | |
$('#request_custom_fields_23591935') | |
.focusout(function() | |
{ | |
var nameReg = /^[A-Za-z]+$/; | |
var isValid = $('#request_custom_fields_23591935') | |
.val() | |
.match(nameReg); | |
if (isValid && isValid.length > 0) | |
{ |
This file contains hidden or 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
/* | |
ONE OF THESE SHOULD WORK | |
*/ | |
// SUBMIT A REQUEST FOR ZERO RESULTS | |
if( (window.location.pathname.match("/search")) ) { | |
if ( $('.search-results-list').length === 0 ) { $('.search-results-column p').replaceWith( "Please now <a href='https://" + HelpCenter.account.subdomain + ".zendesk.com/" + HelpCenter.user.locale + "/requests/new'>Submit a Request</a>" ) } | |
} | |
// SUBMIT A REQUEST FOR ZERO RESULTS |
This file contains hidden or 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
with( ZendeskApps.AppScope.create() ) { | |
var source = (function() { | |
return { | |
defaultState: "loading", | |
events: { | |
"app.activated": function() { | |
this.key = this._parameter("key") || this.resources.KEY; | |
this.tag = this._parameter("tag") || this.resources.TAG; | |
this.rating = (this._parameter("rating") || this.resources.RATING).toLowerCase(); |
This file contains hidden or 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
(function() { | |
return { | |
current_user: null, | |
requests: { | |
fetchCurrentUser: function(){ | |
return { | |
url: '/api/v2/users/' + this.currentUser().id() + '.json?include=groups,organizations', | |
method: 'GET', | |
proxy_v2: true | |
}; |
This file contains hidden or 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
/* | |
Copyright 2011 Martin Hawksey | |
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 |
This file contains hidden or 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
function ImportHCcontent(){ | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
var source = SpreadsheetApp.getActiveSpreadsheet(); | |
var range = sheet.getDataRange(); | |
var start_row = 1; | |
for (var i = start_row; i < range.getLastRow(); i++) { | |
// get values |
This file contains hidden or 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
console.log('@Klaus, i am working, bro...'); | |
var results = []; | |
function getTickets(url) { | |
jQuery.ajax({ | |
url: url, | |
method: "GET", | |
async: false | |
}).done(function(data) { | |
jQuery.each(data.results, function(i, v) { |
OlderNewer