Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
652e9f1f
Commit
652e9f1f
authored
Nov 27, 2013
by
Robert Lyon
Committed by
Gerrit Code Review
Nov 27, 2013
Browse files
Merge "When device detection is on, show radio button (Bug 1248307)"
parents
0808cad7
d40679de
Changes
3
Hide whitespace changes
Inline
Side-by-side
htdocs/js/views.js
View file @
652e9f1f
...
...
@@ -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
();
});
...
...
htdocs/theme/views.css
View file @
652e9f1f
...
...
@@ -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
-4
4
px
;
margin
:
0
0
0
-4
5
px
;
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
;
}
...
...
htdocs/view/blocks.php
View file @
652e9f1f
...
...
@@ -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
});"
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment