Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
marcus-lodspeakr
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
uib-ub
Spesialsamlingene
marcus-lodspeakr
Commits
e14efa59
Commit
e14efa59
authored
12 years ago
by
alvaro
Browse files
Options
Downloads
Patches
Plain Diff
Adding first version of visualization cheat sheet to component editor
parent
f0933d4c
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
classes/modules/adminModule.php
+30
-0
30 additions, 0 deletions
classes/modules/adminModule.php
doc/examples/originalComponents/static/admin/js/editor.js
+27
-1
27 additions, 1 deletion
doc/examples/originalComponents/static/admin/js/editor.js
with
57 additions
and
1 deletion
classes/modules/adminModule.php
+
30
−
0
View file @
e14efa59
...
@@ -27,6 +27,32 @@ class AdminModule extends abstractModule{
...
@@ -27,6 +27,32 @@ class AdminModule extends abstractModule{
background-position: right;
background-position: right;
}
}
.strong{font-weight: 900; font-size:120%}
.strong{font-weight: 900; font-size:120%}
.cheat-sheet{
-moz-border-radius: 15px;
-webkit-border-radius: 15px;
border-radius: 15px;
background:lightgray;
width:400px;
padding:5px;
position:absolute;
border:1px solid black;
right:-370px;
top:121px;
opacity:0.9
}
.cheat-title{
writing-mode:tb-rl;
-webkit-transform:rotate(90deg);
-moz-transform:rotate(90deg);
-o-transform: rotate(90deg);
white-space:nowrap;
display:block;
width:20px;
height:40px;
font-size:24px;
font-weight:normal;
text-shadow: 0px 0px 1px #333;
}
/* Base class */
/* Base class */
.bs-docs-template {
.bs-docs-template {
position: relative;
position: relative;
...
@@ -39,6 +65,10 @@ class AdminModule extends abstractModule{
...
@@ -39,6 +65,10 @@ class AdminModule extends abstractModule{
-moz-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
border-radius: 4px;
}
}
.cheat-list{
margin-left:60px;
margin-top:-40px;
}
/* Echo out a label for the example */
/* Echo out a label for the example */
.bs-docs-template:after {
.bs-docs-template:after {
...
...
This diff is collapsed.
Click to expand it.
doc/examples/originalComponents/static/admin/js/editor.js
+
27
−
1
View file @
e14efa59
...
@@ -19,7 +19,33 @@ $(document).ready(function(){
...
@@ -19,7 +19,33 @@ $(document).ready(function(){
};
};
return
CodeMirror
.
overlayMode
(
CodeMirror
.
getMode
(
config
,
parserConfig
.
backdrop
||
'
text/html
'
),
mustacheOverlay
);
return
CodeMirror
.
overlayMode
(
CodeMirror
.
getMode
(
config
,
parserConfig
.
backdrop
||
'
text/html
'
),
mustacheOverlay
);
});
});
var
cheatSheet
=
$
(
"
body
"
).
append
(
"
<div id='cheat' class='cheat-sheet'></div>
"
);
$
(
"
#cheat
"
).
on
(
'
mouseenter
'
,
function
(){
$
(
this
).
animate
({
right
:
'
+=200
'
},
180
)})
.
on
(
'
mouseleave
'
,
function
(){
$
(
this
).
animate
({
right
:
'
-=200
'
},
180
)}).
html
(
"
<span class='cheat-title'>Visualization Filters</span>
"
);
$
(
"
#cheat
"
).
append
(
"
<ul id='cheat-list' class='cheat-list'></ul>
"
);
var
visualizationsEnabled
=
[
'
D3CirclePacking
'
,
'
D3Dendrogram
'
,
'
D3ForceGraph
'
,
'
D3ParallelCoordinates
'
,
'
GoogleMaps
'
,
'
GoogleVizBarChart
'
,
'
GoogleVizColumnChart
'
,
'
GoogleVizLineChart
'
,
'
GoogleVizPieChart
'
,
'
GoogleVizScatterChart
'
,
'
GoogleVizTable
'
,
'
Timeknots
'
];
$
.
each
(
visualizationsEnabled
,
function
(
index
,
value
){
$
(
"
#cheat-list
"
).
append
(
"
<li><a href='#' class='cheat-link'>
"
+
value
+
"
</a></li>
"
);
});
$
(
"
.cheat-link
"
).
on
(
'
click
'
,
function
(){
var
visualFilter
=
'
{{models.main|
'
+
$
(
this
).
html
()
+
'
:""}}
'
;
templateEditor
.
replaceSelection
(
visualFilter
);
});
//Create Template and Query Editor
//Create Template and Query Editor
var
templateEditor
=
CodeMirror
.
fromTextArea
(
document
.
getElementById
(
'
template-editor
'
),
{
mode
:
'
mustache
'
,
var
templateEditor
=
CodeMirror
.
fromTextArea
(
document
.
getElementById
(
'
template-editor
'
),
{
mode
:
'
mustache
'
,
onChange
:
function
(
e
){
onChange
:
function
(
e
){
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment