forked from vitmalina/w2ui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master'
Conflicts: dist/w2ui-fields.min.js dist/w2ui.min.js
- Loading branch information
Showing
180 changed files
with
6,098 additions
and
3,110 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,5 @@ node_modules/ | |
.idea | ||
*.iml | ||
*.ipr | ||
*.iws | ||
*.iws | ||
/npm-debug.log |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<div class="content"> | ||
<div id="example_title"> | ||
<h1>Improoved Keyboard Support (new in 1.5)</h1> | ||
Since the content behind popup is locked it is logical to keep keyboard focus inside the popup. If user clicks tab key, it will loop through the input controls inside popup and not come outside of it. | ||
</div> | ||
<div id="example_view"></div> | ||
<div id="example_code"></div> | ||
</div> | ||
|
||
<!--CODE--> | ||
<button class="w2ui-btn" onclick="popup()">Open Popup</button> | ||
|
||
<!--CODE--> | ||
<script> | ||
function popup() { | ||
w2popup.open({ | ||
width : 580, | ||
height : 350, | ||
title : 'Title', | ||
body : '<div class="w2ui-centered" style="line-height: 1.8">'+ | ||
' Use tab key to loop through the input contols. <br>The focus will not leave popup. <br><br>'+ | ||
' Text 1: <input class="w2ui-input" style="margin-bottom: 5px"><br>'+ | ||
' Text 2: <input class="w2ui-input" style="margin-bottom: 5px"><br>'+ | ||
' Text 3: <input class="w2ui-input" style="margin-bottom: 5px"><br>'+ | ||
'</div>', | ||
buttons : '<button class="w2ui-btn" onclick="w2popup.close()">Ok</button>'+ | ||
'<button class="w2ui-btn" onclick="w2popup.close()">Cancel</button>' | ||
}); | ||
} | ||
</script> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<div class="content"> | ||
<div id="example_title"> | ||
<h1>Alert and Confirm inside Popup (new in 1.5)</h1> | ||
When popup is open, you can also use w2alert(), w2confirm() or stack messages on top of it. | ||
</div> | ||
<div id="example_view"></div> | ||
<div id="example_code"></div> | ||
</div> | ||
|
||
<!--CODE--> | ||
<button class="w2ui-btn" onclick="popup()">Open Popup</button> | ||
|
||
<!--CODE--> | ||
<script> | ||
var counter; | ||
function popup() { | ||
w2popup.open({ | ||
width : 580, | ||
height : 350, | ||
title : 'Title', | ||
body : '<div class="w2ui-centered">This is text inside the popup</div>', | ||
buttons : '<button class="w2ui-btn" onclick="w2alert(\'alert\')">Alert</button>'+ | ||
'<button class="w2ui-btn" onclick="w2confirm(\'confirm\')">Confirm</button>'+ | ||
'<button class="w2ui-btn" onclick="counter = 0; show();">Message</button>', | ||
showMax : true | ||
}); | ||
} | ||
|
||
function show() { | ||
w2popup.message({ | ||
width : 350, | ||
height : 170, | ||
body : '<div class="w2ui-centered">Are you sure (click No). ' + (counter || '') + '</div>', | ||
buttons : '<button class="w2ui-btn" onclick="w2popup.message()">Ok</button>'+ | ||
'<button class="w2ui-btn" onclick="show()">More</button>' | ||
}); | ||
counter++; | ||
} | ||
</script> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<div class="content"> | ||
<div id="example_title"> | ||
<h1>In/Out of Focus (new in 1.5)</h1> | ||
Keyborad navigation is an important feature of w2ui and it plays a role for the sidebar. Sidebar can be in focus and receive all input | ||
from the mouse or focus can be somewhere else. | ||
</div> | ||
<div id="example_view"></div> | ||
<div id="example_code"></div> | ||
</div> | ||
|
||
<!--CODE--> | ||
<div id="sidebar" style="height: 300px; width: 200px; float: left"></div> | ||
<div style="margin-left: 220px;"> | ||
<span id="hasFocus"></span> | ||
</div> | ||
<div style="clear: both"/> | ||
|
||
<!--CODE--> | ||
<script> | ||
$(function () { | ||
$('#sidebar').w2sidebar({ | ||
name : 'sidebar', | ||
nodes: [ | ||
{ id: 'level-1', text: 'Level 1', img: 'icon-folder', expanded: true, group: true, | ||
nodes: [ { id: 'level-1-1', text: 'Level 1.1', icon: 'fa-home' }, | ||
{ id: 'level-1-2', text: 'Level 1.2', icon: 'fa-coffee' }, | ||
{ id: 'level-1-3', text: 'Level 1.3', icon: 'fa-comment-alt' } | ||
] | ||
}, | ||
{ id: 'level-2', text: 'Level 2', img: 'icon-folder', group: true, | ||
nodes: [ { id: 'level-2-1', text: 'Level 2.1', icon: 'fa-star-empty' }, | ||
{ id: 'level-2-2', text: 'Level 2.2', icon: 'fa-star-empty' }, | ||
{ id: 'level-2-3', text: 'Level 2.3', icon: 'fa-star-empty' } | ||
] | ||
}, | ||
{ id: 'level-3', text: 'Level 3', img: 'icon-folder', group: true, | ||
nodes: [ { id: 'level-3-1', text: 'Level 3.1', icon: 'fa-star-empty' }, | ||
{ id: 'level-3-2', text: 'Level 3.2', icon: 'fa-star-empty' }, | ||
{ id: 'level-3-3', text: 'Level 3.3', icon: 'fa-star-empty' } | ||
] | ||
} | ||
], | ||
onFocus: function (event) { | ||
console.log('focus', event); | ||
$('#hasFocus').html('<span style="background-color: #eee; padding: 5px; border-radius: 3px;">HAS FOCUS</span>'); | ||
}, | ||
onBlur: function (event) { | ||
console.log('blur', event); | ||
$('#hasFocus').html(''); | ||
} | ||
}); | ||
}); | ||
</script> |
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<div class="content"> | ||
<div id="example_title"> | ||
<h1>Flat Sidebar (new in 1.5)</h1> | ||
Often it is useful to collapse sibebar into a single line. To do that set flatButton to true and on the flat event adjust sidebar container's width. | ||
</div> | ||
<div id="example_view"></div> | ||
<div id="example_code"></div> | ||
</div> | ||
|
||
<!--CODE--> | ||
<div id="sidebar" style="height: 300px; width: 200px; float: left"></div> | ||
<div style="margin-left: 220px;"> | ||
<button class="w2ui-btn" onclick="w2ui.sidebar.goFlat()">Go Flat</button> | ||
</div> | ||
<div style="clear: both"/> | ||
|
||
<!--CODE--> | ||
<script> | ||
$(function () { | ||
$('#sidebar').w2sidebar({ | ||
name : 'sidebar', | ||
flatButton: true, | ||
nodes: [ | ||
{ id: 'level-1', text: 'Level 1', img: 'icon-folder', expanded: true, group: true, groupShowHide: false, | ||
nodes: [ { id: 'level-1-1', text: 'Level 1.1', icon: 'fa-home' }, | ||
{ id: 'level-1-2', text: 'Level 1.2', icon: 'fa-coffee' }, | ||
{ id: 'level-1-3', text: 'Level 1.3', icon: 'fa-comment-alt' } | ||
] | ||
}, | ||
{ id: 'level-2', text: 'Level 2', img: 'icon-folder', group: true, | ||
nodes: [ { id: 'level-2-1', text: 'Level 2.1', icon: 'fa-star-empty' }, | ||
{ id: 'level-2-2', text: 'Level 2.2', icon: 'fa-star-empty' }, | ||
{ id: 'level-2-3', text: 'Level 2.3', icon: 'fa-star-empty' } | ||
] | ||
} | ||
], | ||
onFlat: function (event) { | ||
$('#sidebar').css('width', (event.goFlat ? '35px' : '200px')); | ||
} | ||
}); | ||
}); | ||
</script> |
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
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
Oops, something went wrong.