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
<dojoModules> | |
<add name="alloy" path="Scripts" /> | |
</dojoModules> |
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
using EPiServer.Shell.ViewComposition; | |
using EPiServer.Shell.Web; | |
using EPiServer.Cms.Shell; | |
using EPiServer.Cms.Shell.UI; | |
namespace testepi7.MyWidgets | |
{ | |
[Component( | |
PlugInAreas = "/episerver/cms/assets", | |
Categories = "cms", |
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
var deffered = xhr.get({ | |
url: '/getSomePage' | |
}); | |
deffered.then(function (result) { | |
result.property = 'Something more'; | |
return result; | |
}).then(function (resultWithObjectProperty) { | |
// Gjør noe | |
}, function (err) { |
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
require(['dojo/aspect'], function (aspect) { | |
var original = { | |
someMethod: function (arg1, arg2) { | |
console.warn('original.someMethod called:', arg1, arg2); | |
return 'Hello ' + arg1 + ' ' + arg2; | |
} | |
}; | |
// aspect.before | |
aspect.before(original, 'someMethod', function (arg1, arg2) { |
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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Dojo test</title> | |
<link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/dojo/1.8.1/dijit/themes/claro/claro.css"> | |
<script src="//ajax.googleapis.com/ajax/libs/dojo/1.8.1/dojo/dojo.js" data-dojo-config="isDebug: true, async: true, parseOnLoad: true"></script> | |
</head> | |
<body class="claro"> | |
<h1>This is a template test:</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
define([ | |
'dojo/_base/declare', | |
'dijit/_WidgetBase', | |
'dijit/_TemplatedMixin', | |
'dojo/text!./templates/template.html', | |
'dijit/form/Button' | |
], function (declare, _WidgetBase, _TemplatedMixin, template, button) { | |
return declare('myWidget', [_WidgetBase, _TemplatedMixin], { | |
templateString: template, |
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
<div> | |
<p>This is from a template.</p> | |
<button data-dojo-type="dijit.form.Button" >My button</button> | |
</div> |
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
<html> | |
... | |
<div data-dojo-type="myWidget"></div> | |
<script> | |
require( | |
['demo/myWidget', | |
'dojo/parser', | |
'dojo/domReady!'], |
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
define([ | |
'_MyMixin', | |
'myWidget' | |
], function (_MyMixin, myWidget) | |
{ | |
return declare('my.widget.name', [_MyMixin, myWidget], { | |
myProperty: 'prop', | |
myFunction: function () { | |
console.log('hei hei ' + propertyFromMyWidget); | |
}, |
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
A: No | |
B: 99 | |
C: true | |
D: false |
NewerOlder