public
Last active

  • Download Gist
hellotest.js
JavaScript
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
IN.$extensions("HelloWorld", function HelloWorld() {
Sslac.Class("IN.Tags.HelloWorld").Extends("IN.Tags.Base")
.Constructor(function Constructor(el, attributes) {
this.Parent(el, attributes);
this.el().innerHTML = "Hello World to "+attributes.name;
var w = new IN.Objects.Window({
mode: "inline-iframe",
url: "http://www.google.com"
}).place(this.el());
});
IN.addTag("HelloWorld", IN.Tags.HelloWorld);
});
helloworld-btn.js
JavaScript
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
IN.$extensions("HelloWorld", function HelloWorld() {
Sslac.Class("IN.Tags.HelloWorld").Extends("IN.Tags.Base")
.Constructor(function Constructor(el, attributes) {
this.Parent(el, attributes);
this.el().innerHTML = "Hello World to "+attributes.name;
var button = new IN.Objects.Button({
title: "Click Me"
});
button.place(this.el());
IN.Event.on(button, "click", function(evt) {
evt.preventDefault();
document.body.style.color = "#f00";
}, this);
});
IN.addTag("HelloWorld", IN.Tags.HelloWorld);
});
helloworldtag-log.js
JavaScript
1 2 3 4 5 6
IN.$extensions("HelloWorld", function HelloWorld() {
// Body of Extension Goes Here
console.log("HelloWorld Extension has Executed");
});
helloworldtag.js
JavaScript
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
IN.$extensions("HelloWorld", function HelloWorld() {
Sslac.Class("IN.Tags.HelloWorld").Extends("IN.Tags.Base")
.Constructor(function Constructor(el, attributes) {
this.Parent(el, attributes);
var win = new IN.Objects.Window({
mode: "inline-iframe",
url: "http://jheuser-md.linkedin.biz:8081/sytycw/sample2.html"
});
win.place(this.el());
});
IN.addTag("HelloWorld", IN.Tags.HelloWorld);
});
windowpatch.js
JavaScript
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
IN.$extensions("WindowPatch", function WindowPatch() {
if (IN && IN.Objects && IN.Objects.Window) {
return;
}
function remapMode(mode) {
switch(mode) {
case "invisible-iframe":
return "invisible";
case "hover-iframe":
return "hovercard";
case "iframe":
return "modal";
case "inline-iframe":
return "embedded";
case "popup":
return "popup";
}
}
Sslac.Class("IN.Objects.Window")
.Constructor(function Constructor(config) {
config = config || {};
config = {
url: config.url || null,
mode: config.mode || null,
anchor: config.anchor || null
};
config.mode = remapMode(config.mode);
return new IN.Objects.SmartWindow(config);
});
});

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.