Created
February 17, 2011 17:19
-
-
Save jakobo/832172 to your computer and use it in GitHub Desktop.
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
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); | |
}); |
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
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); | |
}); |
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
IN.$extensions("HelloWorld", function HelloWorld() { | |
// Body of Extension Goes Here | |
console.log("HelloWorld Extension has Executed"); | |
}); |
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
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); | |
}); |
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
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); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment