Kenneth G. Franqueiro kfranqueiro

View MoreMixin.html
1 2 3 4 5 6 7 8 9 10
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="../../dojo/resources/dojo.css">
<link rel="stylesheet" href="../../dgrid/css/skins/claro.css">
<style>
#list {
border: none;
height: auto;
View enterUp.js
1 2 3 4 5 6 7 8 9 10
function enterUp(node, listener) {
return on(node, "keyup", function(evt) {
if (evt.keyCode === 13) {
listener.call(this, evt);
}
});
}
 
// Usage with dojo/on: on(element, enterUp, ...)
// Usage with dgrid editor: editor({ editOn: enterUp, ... })
View findDep.js
1 2 3 4 5 6 7 8 9 10
function findDep(depid) {
return Object.keys(require.modules).map(function(mid) {
return require.modules[mid];
}).filter(function(m) {
return m.deps && m.deps.map(function(dep) {
return dep.mid;
}).indexOf(depid) > -1;
}).map(function(m) {
return m.mid;
});
View SummaryRow.js
1 2 3 4 5 6 7 8 9 10
define([
"dojo/_base/declare",
"dojo/_base/lang",
"put-selector/put"
], function(declare, lang, put) {
return declare(null, {
// summary:
// A mixin for dgrid components which is designed to handle metadata
// returned by a store query for dictating column structure and
// rendering a row with summary information (e.g. totals).
View test.html
1 2 3 4 5 6 7 8 9 10
<!DOCTYPE html>
<html>
<head>
<style>
#hierarchyTree {
height: 200px;
}
#hierarchyTree .dgrid-cell {
width: 100px;
View test59.html
1 2 3 4 5 6 7 8 9 10
<!DOCTYPE html>
<html>
<head>
<title>Test Issue #59</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="viewport" content="width=570"/>
<style type="text/css">
@import "../../dijit/themes/claro/document.css";
@import "../../dijit/themes/claro/claro.css";
@import "../css/dgrid.css";
View ParentHierarchical.js
1 2 3 4 5 6 7 8 9
/*
 
NOTE: This wrapper "works", but is sorta incomplete...
 
* It does not explicitly support deterministic ordering/rearrangement of children.
* For that matter, the way Tree currently achieves this seems sort of obtuse.
Tree makes a blatant assumption on the existence of a children attribute
(since there is no dedicated method to set them), and reconstructs the array
every time children are reordered...
View DeferredDeclarativeMenu.js
1 2 3 4 5 6 7 8 9 10
dojo.provide('kgf.widget.DeferredDeclarativeMenu');
 
dojo.require('dojo.parser');
dojo.require('dojo.string');
dojo.require('dijit.Menu');
dojo.requireLocalization('dijit', 'loading');
 
dojo.declare('kgf.widget._DeferredDeclarativeMenuMixin', null, {
// src: String
// URL to be loaded when this menu is opened.
View FixedFileUploader.js
1 2 3 4 5 6 7 8 9 10
dojo.declare('kgf.dijit.FixedFileUploader', dojox.form.FileUploader, {
// summary:
// Private class containing fixes to FileUploader behavior.
 
getHiddenWidget: function() {
var widget = this.inherited(arguments);
if (widget && dojo.position(widget.domNode).h > 0) {
//false positive - sure the widget has onShow, but it's already shown!
//(workaround to Dojo bug #11039)
//TODO: will need to see if this check suffices for situations where
View screening.js
1 2 3 4 5 6 7 8 9
// 1: how could you rewrite the following to make it shorter?
if (foo) {
bar.doSomething(el);
} else {
bar.doSomethingElse(el);
}
 
// 1A:
bar[foo ? 'doSomething' : 'doSomethingElse'](el);
Something went wrong with that request. Please try again.