renamed Dobson theme "Valencia"
42
docs/_assets/js/_viewsource.js
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
//quick view source in new window links
|
||||
$.fn.addSourceLink = function(style){
|
||||
|
||||
return $(this).each(function(){
|
||||
var link = $('<a href="#" data-inline="true">View Source</a>'),
|
||||
src = src = $('<div></div>').append( $(this).clone() ).html(),
|
||||
page = $( "<div data-role='dialog' data-theme='a'>" +
|
||||
"<div data-role='header' data-theme='b'>" +
|
||||
"<a href='#' class='ui-btn-left' data-icon='delete' data-iconpos='notext'>Close</a>"+
|
||||
"<div class='ui-title'>jQuery Mobile Source Excerpt</div>"+
|
||||
"</div>"+
|
||||
"<div data-role='content'></div>"+
|
||||
"</div>" )
|
||||
.appendTo( "body" )
|
||||
.page();
|
||||
|
||||
$('<a href="#">View Source</a>')
|
||||
.buttonMarkup({
|
||||
icon: 'arrow-u',
|
||||
iconpos: 'notext'
|
||||
})
|
||||
.click(function(){
|
||||
var codeblock = $('<pre><code></code></pre>');
|
||||
src = src.replace(/&/gmi, '&').replace(/"/gmi, '"').replace(/>/gmi, '>').replace(/</gmi, '<').replace('data-jqm-source="true"','');
|
||||
codeblock.find('code').append(src);
|
||||
|
||||
var activePage = $(this).parents('.ui-page-active');
|
||||
page.find('.ui-content').append(codeblock);
|
||||
$.changePage(activePage, page, 'slideup',false);
|
||||
page.find('.ui-btn-left').click(function(){
|
||||
$.changePage(page, activepage, 'slideup',true);
|
||||
return false;
|
||||
});
|
||||
})
|
||||
.insertAfter(this);
|
||||
});
|
||||
};
|
||||
|
||||
//set up view source links
|
||||
$('div').live('pagebeforecreate',function(){
|
||||
$(this).find('[data-jqm-source="true"]').addSourceLink();
|
||||
});
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
(function($){
|
||||
$.themeswitcher = function(){
|
||||
var themesDir = 'themes/',
|
||||
themes = ['default','dobson'],
|
||||
themes = ['default','valencia'],
|
||||
currentPage = $('.ui-page-active'),
|
||||
menuPage = $( '<div data-role=\'dialog\' data-theme=\'a\'>' +
|
||||
'<div data-role=\'header\' data-theme=\'b\'>' +
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
//menu items
|
||||
$.each(themes, function( i ){
|
||||
$('<li><a href=\'#\'>' + themes[ i ] + '</a></li>')
|
||||
$('<li><a href=\'#\'>' + themes[ i ].charAt(0).toUpperCase() + themes[ i ].substr(1) + '</a></li>')
|
||||
.click(function(){
|
||||
addTheme( themes[i] );
|
||||
done();
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 8.6 KiB |
|
Before Width: | Height: | Size: 503 B After Width: | Height: | Size: 503 B |
|
Before Width: | Height: | Size: 364 B After Width: | Height: | Size: 364 B |
|
Before Width: | Height: | Size: 460 B After Width: | Height: | Size: 460 B |
|
Before Width: | Height: | Size: 453 B After Width: | Height: | Size: 453 B |
|
Before Width: | Height: | Size: 519 B After Width: | Height: | Size: 519 B |
|
Before Width: | Height: | Size: 232 B After Width: | Height: | Size: 232 B |
|
Before Width: | Height: | Size: 236 B After Width: | Height: | Size: 236 B |
|
Before Width: | Height: | Size: 236 B After Width: | Height: | Size: 236 B |
|
Before Width: | Height: | Size: 231 B After Width: | Height: | Size: 231 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 965 B After Width: | Height: | Size: 965 B |
|
Before Width: | Height: | Size: 971 B After Width: | Height: | Size: 971 B |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 6.3 KiB |
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |