Skip to content

Instantly share code, notes, and snippets.

View strayblues's full-sized avatar
🌎
הלו עולם

Hagar Shilo strayblues

🌎
הלו עולם
View GitHub Profile
<body>
<h1>Demo ToDo app with OOjs UI</h1>
<div class="wrapper"></div>
</body>
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 );
} )
};
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 );
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 () {
var ToDoItemWidget3 = function ( config ) {
config = config || {};
ToDoItemWidget3.parent.call( this, config );
this.deleteButton = new OO.ui.ButtonWidget( {
label: 'Delete'
} );
this.$element
.addClass( 'todo-itemWidget' )
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 () {
@strayblues
strayblues / gsoc18.md
Last active August 26, 2018 11:12
Google Summer of Code 2018 project summary by Hagar Shilo

Google Summer of Code 2018 at Wikimedia Foundation: Project Summary

Final Report by Hagar Shilo

For bi-weekly reports visit my userpage schedule or my blog

GSoC Project: OOUI Tutorial Migration

About

<!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">
√סבכ
body {
background-color: #ccc;
text-align: center;
}
canvas {
touch-action: none;
background-color: #fff;
}