Commit 652e9f1f authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review
Browse files

Merge "When device detection is on, show radio button (Bug 1248307)"

parents 0808cad7 d40679de
......@@ -122,10 +122,17 @@
}
else if (config['handheld_device'] || ViewManager.isIE6 || (navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)) || (navigator.userAgent.match(/iPad/i))) {
// Unhide the radio button if the browser is iPhone, IPad or IPod
$('#editcontent-sidebar').css('width', ViewManager.contentEditorWidth+'px');
$('#editcontent-sidebar').addClass('withradio');
$('#page').addClass('withradio');
$('#content-editor input.blocktype-radio').each(function() {
$(this).show();
});
$('#accordion a.nonjs').each(function() {
$(this).hide();
});
$('#accordion div.withjs').each(function() {
$(this).show();
});
$('#accordion *').css('zoom', '1');
$('#main-column-container .tabswrap ul li a').css('float', 'left'); // fix li elements not floating left by floating anchors
}
......@@ -153,10 +160,21 @@
makeNewBlocksDraggable();
showColumnBackgroundsOnSort();
// Unhide the radio button if the browser is iPhone, IPad or IPod
if (ViewManager.isIE6) {
if (config['handheld_device'] || ViewManager.isIE6 || (navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)) || (navigator.userAgent.match(/iPad/i))) {
// Unhide the radio button if the browser is iPhone, IPad or IPod
$('#editcontent-sidebar').addClass('withradio');
$('#page').addClass('withradio');
$('#content-editor input.blocktype-radio').each(function() {
$(this).show();
});
$('#accordion a.nonjs').each(function() {
$(this).hide();
});
$('#accordion div.withjs').each(function() {
$(this).show();
});
$('#accordion *').css('zoom', '1');
$('#main-column-container .tabswrap ul li a').css('float', 'left'); // fix li elements not floating left by floating anchors
}
checkEditAreaHeight();
});
......
......@@ -187,9 +187,15 @@ ul.colnav li.selected span {
.no-js #editcontent-sidebar {
top: 5px;
}
#editcontent-sidebar.withradio {
width: 190px;
}
#editcontent-sidebar.collapsed {
width: 42px;
}
#editcontent-sidebar.collapsed.withradio {
width: 62px;
}
#editcontent-sidebar.collapsed .withjs {
text-indent: -9999px;
}
......@@ -243,19 +249,19 @@ ul.colnav li.selected span {
padding: 4px 4px 4px 32px;
vertical-align: middle;
}
.no-js .blocktype {
.no-js .blocktype, .withradio .blocktype {
padding-left: 50px;
}
.blocktype-list .blocktype-radio {
cursor: default; /* ie fix */
margin: 0 0 0 -44px;
margin: 0 0 0 -45px;
vertical-align: middle;
}
.blocktype img {
vertical-align: middle;
margin-left: -28px;
}
.no-js .blocktype img {
.no-js .blocktype img, .withradio .blocktype img {
margin: 0;
}
.blocktypetitle {
......@@ -410,9 +416,15 @@ ul.colnav li.selected span {
min-height: 435px;
}
#tabcontent #page,
#tabcontent #page.open.withradio {
margin-left: 197px;
}
#tabcontent #page.open {
margin-left: 177px;
}
#tabcontent #page.collapsed.withradio {
margin-left: 69px;
}
#tabcontent #page.collapsed {
margin-left: 49px;
}
......
......@@ -139,7 +139,7 @@ if ($viewtheme && !isset($allowedthemes[$viewtheme])) {
exit;
}
$javascript = array('views', 'tinymce', 'paginator', 'jquery', 'js/jquery/jquery-ui/js/jquery-ui-1.8.19.custom.min.js', 'tablerenderer', 'artefact/file/js/filebrowser.js', 'lib/pieforms/static/core/pieforms.js','js/jquery/modernizr.custom.js');
$javascript = array('views', 'tinymce', 'paginator', 'js/jquery/jquery-ui/js/jquery-ui-1.8.19.custom.min.js', 'tablerenderer', 'artefact/file/js/filebrowser.js', 'lib/pieforms/static/core/pieforms.js','js/jquery/modernizr.custom.js');
$blocktype_js = $view->get_all_blocktype_javascript();
$javascript = array_merge($javascript, $blocktype_js['jsfiles']);
$inlinejs = "addLoadEvent( function() {\n" . join("\n", $blocktype_js['initjs']) . "\n});";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment