Final Report by Hagar Shilo
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
<body> | |
<h1>Demo ToDo app with OOjs UI</h1> | |
<div class="wrapper"></div> | |
</body> |
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
ToDoItemWidget.prototype.getJSON1 = function () { | |
return $.getJSON( 'https://api.github.com/users/strayblues' ) | |
.then( function( data ) { | |
console.log( data ); | |
return data.name; | |
}, function( promise, error, errorType ) { | |
console.log( 'Failure: ', promise, error, errorType ); | |
return $.Deferred().resolve( 'Could not fetch name: ' + errorType ); | |
} ) | |
}; |
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 ToDoItemWidget4 = function ( config ) { | |
config = config || {}; | |
ToDoItemWidget4.parent.call( this, config ); | |
this.deleteButton.connect( this, { click: 'onDeleteButtonClick' } ); | |
}; | |
OO.inheritClass( ToDoItemWidget4, ToDoItemWidget2 ); | |
ToDoItemWidget5.prototype.onDeleteButtonClick = function () { |
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 ToDoItemWidget = function ( config ) { | |
// Configuration object is optional | |
config = config || {}; | |
// Call parent constructor | |
ToDoItemWidget.parent.call( this, config ); | |
}; | |
// Inheritance | |
OO.inheritClass( ToDoItemWidget, OO.ui.OptionWidget ); |
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 ToDoItemWidget3 = function ( config ) { | |
config = config || {}; | |
ToDoItemWidget3.parent.call( this, config ); | |
this.deleteButton = new OO.ui.ButtonWidget( { | |
label: 'Delete' | |
} ); | |
this.$element | |
.addClass( 'todo-itemWidget' ) |
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 ToDoItemWidget2 = function ( config ) { | |
config = config || {}; | |
ToDoItemWidget2.parent.call( this, config ); | |
this.creationTime = config.creationTime; | |
}; | |
OO.inheritClass( ToDoItemWidget2, OO.ui.OptionWidget ); | |
ToDoItemWidget2.prototype.getCreationTime = function () { |
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
√סבכ |
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"> | |
<link rel="stylesheet" type="text/css" href="style.css"> | |
<script src="main.js"></script> | |
</head> | |
<body onload="init()"> | |
<div> | |
<div class="canvas-container"> |
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
function getColor() { | |
return document.querySelector(".color").value; | |
} |
OlderNewer