voloko / uki Goto Github PK
View Code? Open in Web Editor NEWSimple UiKit for complex web apps
Home Page: http://ukijs.org
License: MIT License
Simple UiKit for complex web apps
Home Page: http://ukijs.org
License: MIT License
When you do start to work on this again; I have a slew of bug fixes and enhancements on my branch I would love to merge back into your master.
After the CSS theming changes some weeks ago, uki.more.view.Select does still have the handle as image resource in the theme, but it is not displayed anymore
List views trigger the 'selection' event when they lose focus.
This happens as the previously selected rows are reselected ( by List._blur() line 579 ) so that they get their unfocused look.
This behaviour can be remedied by changing line 204 of List.js:
from:
this.trigger('selection', {source: this});
to:
if (this.hasFocus()) this.trigger('selection', {source: this});
I should be able to change and pull-request this myself, but the github jargon is too difficult for me to understand how.
IMHO the AMD format is better suited for client-side module handling than the CommonJS require() format, so this might be worth a consideration:
https://github.com/amdjs/amdjs-api/wiki/AMD
It is implemented by different loaders, including RequireJS
I'm using a table and I'm unable to get the "selection" binding working. Is there some other binding that should be used instead?
uki({
id: 'tbl',
view: 'Table',
rect: '10 10 100 500',
anchors: 'top right left bottom',
columns : [
{ view : "table.CustomColumn", label: 'hello', width : 100},
],
rowHeight: 22,
data: []
}).attachTo( window, '1010 1010' );
var data = [];
for(var i = 0; i < 100; i += 1)
data.push(["world " + i]);
uki("#tbl").data(data);
uki("#tbl").bind("selection", function(){
console.log("selection changed");
});```
Firstly, I really like Uki, it's an interesting idea.
I have been experimenting with using Uki and jQuery on the same page, and I've found it's a bit tricky. The diff below adds a line that sets the id directly on the element, which means you can do things like this:
$("#myButton").click(function() { ...
instead of having to use the uki("#myButton") method.
I haven't come across any issues with doing this... any thoughts?
Cheers,
Matt Parlane
diff --git a/src/uki-core/view/base.js b/src/uki-core/view/base.js index 66af695..dc6076e 100644 --- a/src/uki-core/view/base.js +++ b/src/uki-core/view/base.js @@ -108,6 +108,7 @@ uki.view.Base = uki.newClass(uki.view.Observable, new function() { if (id === undefined) return this._id; if (this._id) uki.unregisterId(this); this._id = id; + this._dom.id = id; uki.registerId(this); return this; };
This should probably be moved to a theme. Question is, how to best handle theming for uki-more components? Per-component theme extensions or one common extension for all components in uki-more?
Hi Volko,
It seems there's a typo in the 'Longer Examples' section of the readme.
I believe 'SplitPane' should be 'HSplitPane', minor, but it tripped me up for a few minutes.
Thanks for creating uki, it's a very elegant framework.
-Zack
I guess the scrollpane is constantly relayout-ing while the handler is moved, maby it should only layout when the handler is released, or even better, with throttled frequency.
I have a Select control (from uki-more) inside a popup and whenever I open it to see the options, the parent popup disappears
When uki tests if the browser supports native drag & drop it doesn't properly disable for Chrome.
// detect if native DnD is supported
try {
if (
// typeof doc.createElement('div').ondragstart == 'object' || // ie support
typeof doc.createEvent('MouseEvent').dataTransfer == 'object' || // safari
doc.createEvent('DragEvent').initDragEvent // w3c support
) {
// Google Chrome has to many issues with native d&d. It is simpler to disable than to fix
dnd.nativeDnD = !ua.match(/Chrome\/4/);
}
} catch (e) {}
Should be:
// detect if native DnD is supported
try {
if (
// typeof doc.createElement('div').ondragstart == 'object' || // ie support
typeof doc.createEvent('MouseEvent').dataTransfer == 'object' || // safari
doc.createEvent('DragEvent').initDragEvent // w3c support
) {
// Google Chrome has to many issues with native d&d. It is simpler to disable than to fix
dnd.nativeDnD = !ua.match(/Chrome/);
}
} catch (e) {}
example http://ukijs.org/mail/index.html
Если указываем при инициализации кнопки disabled
{view: 'Button', rect: '30 360 200 24', id: 'submit', anchors: 'left top', text: 'Отправить', disabled:TRUE}
то текст у кнопки при раздизейбливании не перекрашивается.
I'm trying to run locally and I'm getting this error, the same using facebook/powereditor who uses uki.
Somebody told me I should change uglify's version, but I do rollback until [email protected] and still getting error.
<PATH>\ukijs-test\node_modules\ukijs>node express.js
<PATH>\ukijs-test\node_modules\ukijs\tools\static_require.js:36
var walker = pro.ast_walker(),
^
TypeError: Cannot call method 'ast_walker' of undefined
at Object.<anonymous> (<PATH>\ukijs-test\node_modules\ukijs\t
ools\static_require.js:36:18)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (<PATH>\node_modules\ukijs\e
xpress.js:3:12)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
a touch ScrollPane bad bad resizing
I'm getting bad gateway errors on some pages such as:
http://ukijs.org/examples/splitPane/
First off, incredible work! Uki is coming along great and I look forward to seeing where it goes in the future.
I realize the ImageCutter (http://ukijs.org/imageCutter/prod.html) doesn't work in any other browser than Firefox but the layout system doesn't seem to work in Chrome. Resizing the window causes the layout to end up being smaller than the window size.
Very impressive! But sadly the Wave demo shows nothing at all in IE6, and the other demos are visually messed up too.
Do you have any thoughts on when you might add IE6 support?
I'm not sure if it's an intentional design decision, but the probe function in Uki (line 1203 in the 0.3.5 dev download) requires the doc.body element to exist, and so it seems to choke when I attempt to put my app's <script> tag in the element, since the dom doesn't have the body element added yet.
Hi,
Examples on the website are not available through the Git repo ...
http://ukijs.org/examples/core-examples/splitPane/splitPane.js
is not the same than https://github.com/voloko/uki/blob/master/examples/core-examples/splitPane/splitPane.js
Which one is the correct one?
Hi! I have started to use Your excellent library a few days ago...I trying to add views dynamically. Example:
uki(
{ view: 'Box', rect: '0 0 500 500', anchors: 'left top', id: 'contents'}
).attachTo(window, '1000 1000');
uki('Box#contents').childViews([
{view: 'Button', rect: '15 15 50 24', anchors: 'left top', text: 'test', style: {fontWeight: 'normal', fontSize: '11px'}, focusable: false}
]);
There is only text - "test" on the page, not button. Button appears only after page resize.
i installed node and npm
i did npm install ukijs
there is no express.js in my directory.
$ find . -name express.js
./node_modules/ukijs/express.js
./node_modules/ukijs/node_modules/express/lib/express.js
is this because npm is now 1.0.6 ?
When a height of a table view is updated so that rows don't fit it anymore, the scrollbar doesn't appear. Manually invoking layout() on _scrollPane property of a table did fix it. This should probably be happening automatically in table view's layout() function.
Thanks for such a great looking framework.
I have spent the past two days trying to get the buttons example to work.
I keep getting 'Object Expected' Error from button.js line 1.
Please help!! I'm losing hair fast becaus eo fthis.
Thanks,
i am just starting.
and now i try to convert the examples express.js to something i could use as an application.
i suggest to make express_example.js and express.js
Hello,
It would be great to see more documentation about how to develop an application following the MVC pattern. You've built the Mail.app as a demonstration of the framework, and it has some controllers, models and, of course, views.
Uki doesn't want to be a Jack-of-all-trades. It only does layout but it does it well. You won't find any ajax or data storage layer code here.
I've saw the above paragraph on the website and I think is a little bit confusing, no?
You've done a great work on the framework, it's really fast and simple.
I'm using uki 0.3.4 and I'm trying to create a slider that goes from -5 to 20 by doing this:
uki({
view: 'Slider',
rect: '10 20 100 0',
min: '-5',
max: '20',
value: '0'
}).attachTo(window);
But my min value of -5 seems to be getting ignored and the slider behaviour isn't quite right.
Thanks!
Is there any way to strip out all the IE6/7 compatibility code, to make uki lighter? I'm not interested in supporting those browsers, but uki looks really interesting.
In cases where only at runtime it is known whether there exist options, there should be possible to set options:[] , but currently that cause an error
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.