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
8c67d170
Commit
8c67d170
authored
12 years ago
by
alvaro
Browse files
Options
Downloads
Patches
Plain Diff
Added embed-this-viz button
parent
014b7741
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
classes/Utils.php
+0
-2
0 additions, 2 deletions
classes/Utils.php
classes/modules/adminModule.php
+16
-3
16 additions, 3 deletions
classes/modules/adminModule.php
doc/examples/originalComponents/static/admin/js/editor.js
+8
-0
8 additions, 0 deletions
doc/examples/originalComponents/static/admin/js/editor.js
with
24 additions
and
5 deletions
classes/Utils.php
+
0
−
2
View file @
8c67d170
...
@@ -570,8 +570,6 @@ class Utils{
...
@@ -570,8 +570,6 @@ class Utils{
Haanga
::
Load
(
$viewFile
,
$vars
);
Haanga
::
Load
(
$viewFile
,
$vars
);
}
catch
(
Exception
$e
){
}
catch
(
Exception
$e
){
echo
'<pre>'
;
echo
'<pre>'
;
echo
$e
->
getMessage
();
var_dump
(
$vars
);
echo
(
$e
->
getMessage
()
.
"' in "
.
$e
->
getFile
()
.
":"
.
$e
->
getLine
()
.
"
\n
Stack trace:
\n
"
.
$e
->
getTraceAsString
());
echo
(
$e
->
getMessage
()
.
"' in "
.
$e
->
getFile
()
.
":"
.
$e
->
getLine
()
.
"
\n
Stack trace:
\n
"
.
$e
->
getTraceAsString
());
echo
'</pre>'
;
echo
'</pre>'
;
}
}
...
...
This diff is collapsed.
Click to expand it.
classes/modules/adminModule.php
+
16
−
3
View file @
8c67d170
...
@@ -163,7 +163,18 @@ class AdminModule extends abstractModule{
...
@@ -163,7 +163,18 @@ class AdminModule extends abstractModule{
<div class='container'>
<div class='container'>
<img src='../img/lodspeakr_logotype.png' style='opacity: 0.1; position: absolute; right:0px; top:60%'/>
<img src='../img/lodspeakr_logotype.png' style='opacity: 0.1; position: absolute; right:0px; top:60%'/>
"
;
"
;
private
$foot
=
" </div>
private
$foot
=
" <div id='embed-box' class='modal hide fade'>
<div class='modal-header'>
<button type='button' class='close' data-dismiss='modal' aria-hidden='true'>×</button>
<h3>Embed this code</h3>
</div>
<div id='embed-body' class='modal-body'>
</div>
<div class='modal-footer'>
<a href='#' class='btn' data-dismiss='modal'>Close</a>
</div>
</div></div>
</body>
</body>
</html>
</html>
"
;
"
;
...
@@ -557,7 +568,8 @@ class AdminModule extends abstractModule{
...
@@ -557,7 +568,8 @@ class AdminModule extends abstractModule{
}
}
}
}
echo
$this
->
head
.
"
echo
$this
->
head
.
"
<script type='application/javascript'>
<script type='application/javascript'>
var home='"
.
$conf
[
'basedir'
]
.
"';
$namespaces
$namespaces
</script>
</script>
<div class='row-fluid'>
<div class='row-fluid'>
...
@@ -587,7 +599,8 @@ class AdminModule extends abstractModule{
...
@@ -587,7 +599,8 @@ class AdminModule extends abstractModule{
</div>
</div>
<div class='row-fluid'>
<div class='row-fluid'>
<div class='span3'>
<div class='span3'>
<a href='#' id='preview-button' class='hide'><button class='btn btn-success btn-large'>View component</button></a>
<p><a href='#' id='preview-button' class='hide'><button class='btn btn-success btn-large'>View component</button></a></p>
<p><button id='embed-button' class='btn btn-success btn-large hide'>Embed component</button></p>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
This diff is collapsed.
Click to expand it.
doc/examples/originalComponents/static/admin/js/editor.js
+
8
−
0
View file @
8c67d170
...
@@ -206,6 +206,7 @@ $(document).ready(function(){
...
@@ -206,6 +206,7 @@ $(document).ready(function(){
$
(
"
#template-list
"
).
empty
();
$
(
"
#template-list
"
).
empty
();
$
(
"
#query-list
"
).
empty
();
$
(
"
#query-list
"
).
empty
();
$
(
"
#preview-button
"
).
attr
(
"
target
"
,
"
_new
"
).
attr
(
"
href
"
,
"
../
"
+
componentName
).
removeClass
(
"
hide
"
);
$
(
"
#preview-button
"
).
attr
(
"
target
"
,
"
_new
"
).
attr
(
"
href
"
,
"
../
"
+
componentName
).
removeClass
(
"
hide
"
);
$
(
"
#embed-button
"
).
attr
(
"
data-url
"
,
"
../
"
+
componentName
).
removeClass
(
"
hide
"
);
$
.
each
(
data
.
views
,
function
(
i
,
item
){
$
.
each
(
data
.
views
,
function
(
i
,
item
){
var
viewUrl
=
relPos
+
componentType
+
"
/
"
+
componentName
+
"
/
"
+
item
;
var
viewUrl
=
relPos
+
componentType
+
"
/
"
+
componentName
+
"
/
"
+
item
;
var
viewFileUrl
=
componentType
+
"
/
"
+
componentName
+
"
/
"
+
item
;
var
viewFileUrl
=
componentType
+
"
/
"
+
componentName
+
"
/
"
+
item
;
...
@@ -378,5 +379,12 @@ $(document).ready(function(){
...
@@ -378,5 +379,12 @@ $(document).ready(function(){
$
(
"
#query-save-button
"
).
addClass
(
'
disabled
'
);
$
(
"
#query-save-button
"
).
addClass
(
'
disabled
'
);
}
}
});
});
$
(
"
#embed-button
"
).
on
(
'
click
'
,
function
(
e
){
var
url
=
$
(
this
).
attr
(
'
data-url
'
).
replace
(
"
../
"
,
home
);
var
code
=
"
<iframe src='
"
+
url
+
"
' style='overflow-x: hidden;overflow-y: hidden;' frameborder='0' width='600px' height='400px'></iframe>
"
;
$
(
"
#embed-body
"
).
html
(
code
);
$
(
"
#embed-box
"
).
modal
(
'
show
'
);
})
}
}
});
});
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