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
<script> | |
import { getSitecoreContext } from "jss-svelte"; | |
import marked from "marked"; | |
export let field = null; | |
export let cssClass = ""; | |
let eeElement = null; | |
const sitecoreContext = getSitecoreContext(); |
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
const Express = require('express'); | |
const { join } = require('path'); | |
const { ManifestManager } = require('../node_modules/@sitecore-jss/sitecore-jss-dev-tools/dist/manifest-manager'); | |
const { createDisconnectedDictionaryService } = require('../node_modules/@sitecore-jss/sitecore-jss-dev-tools/dist/disconnected-server/dictionary-service'); | |
const { createDisconnectedLayoutService } = require('../node_modules/@sitecore-jss/sitecore-jss-dev-tools/dist/disconnected-server/layout-service'); | |
const {createGraphQLService} = require('jss-disconnected-graphql'); | |
function createDefaultDisconnectedServer(options) { | |
let app = options.server; |
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
/* | |
When the app runs in disconnected mode, and Sitecore is not present, we need to give | |
the app copies of the Sitecore APIs it depends on (layout service, dictionary service, content service) | |
to talk to so that the app can run using the locally defined disconnected data. | |
This is accomplished by spinning up a small Express server that mocks the APIs, and then | |
telling the dev server to proxy requests to the API paths to this express instance. | |
*/ | |
/* eslint-disable no-console */ |
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
import React from 'react'; | |
import { withSitecoreContext, dataApi, Placeholder } from '@sitecore-jss/sitecore-jss-react'; | |
import { dataFetcher } from './dataFetcher'; | |
import config from './temp/config'; | |
class ClientSidePlaceholder extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state = { |
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
/*! | |
* jQuery JavaScript Library v1.8.2 | |
* http://jquery.com/ | |
* | |
* Includes Sizzle.js | |
* http://sizzlejs.com/ | |
* | |
* Copyright 2012 jQuery Foundation and other contributors | |
* Released under the MIT license | |
* http://jquery.org/license |
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
// Currency element, port of: https://github.com/rodchile/UITextCurrencyField | |
public class CurrencyElement : EntryElement | |
{ | |
public CurrencyElement (string caption, string placeholder, string value) | |
: base(caption, placeholder, value) | |
{ | |
} | |
private static string CleanString(string target) |
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
var YqlCollection = Backbone.Collection.extend({ | |
query: '', | |
url: 'http://query.yahooapis.com/v1/public/yql', | |
format: 'json', | |
timeout: 10000, | |
dataType: 'jsonp', | |
fetch: function (options) { | |
options = options ? _.clone(options) : {}; | |
options.data = options.data ? _.clone(options.data) : {}; | |
if (!options.data.q) { |
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
var Slideshow = (function($) { | |
function Slideshow(options) { | |
var defaults = { | |
timeout: 0.5, | |
selector: '.content' | |
}; | |
this.options = $.extend(defaults, options); | |
}; |
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
import requests | |
from django.conf import settings | |
def get_woeid(text): | |
if not text: | |
return | |
app_id = settings.WOEID_APP_ID | |
if not app_id: |
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
var app = app || {}; | |
app.models = app.models || {}; | |
app.collections = app.collections || {}; | |
app.views = app.views || {}; | |
(function($, window) { | |
(function(models) { | |
models.Tag = Backbone.Tastypie.Model.extend({ | |
urlRoot: '/api/v1/tag/' |
NewerOlder