Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Cesium
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
clients
Cesium-grp
Cesium
Commits
f0aa5e65
Commit
f0aa5e65
authored
7 years ago
by
Benoit Lavenier
Browse files
Options
Downloads
Patches
Plain Diff
[enh] Cesium API button example: add "none" option for icon
parent
db3b0309
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
www/i18n/locale-en-GB.json
+2
-1
2 additions, 1 deletion
www/i18n/locale-en-GB.json
www/i18n/locale-en.json
+2
-1
2 additions, 1 deletion
www/i18n/locale-en.json
www/i18n/locale-fr-FR.json
+2
-1
2 additions, 1 deletion
www/i18n/locale-fr-FR.json
www/js/api/app.js
+10
-5
10 additions, 5 deletions
www/js/api/app.js
with
16 additions
and
8 deletions
www/i18n/locale-en-GB.json
+
2
−
1
View file @
f0aa5e65
...
...
@@ -843,8 +843,9 @@
"EXAMPLE_BUTTON_TEXT_ICON"
:
"Icon"
,
"EXAMPLE_BUTTON_TEXT_WIDTH"
:
"Width"
,
"EXAMPLE_BUTTON_TEXT_WIDTH_HELP"
:
"eg: 200px, 50%"
,
"EXAMPLE_BUTTON_ICON_
CESIUM"
:
"Cesium logo
"
,
"EXAMPLE_BUTTON_ICON_
NONE"
:
"No icon
"
,
"EXAMPLE_BUTTON_ICON_DUNITER"
:
"Duniter logo"
,
"EXAMPLE_BUTTON_ICON_CESIUM"
:
"Cesium logo"
,
"EXAMPLE_BUTTON_ICON_G1_COLOR"
:
"Ğ1 logo"
,
"EXAMPLE_BUTTON_ICON_G1_BLACK"
:
"Ğ1 logo (outline)"
}
...
...
This diff is collapsed.
Click to expand it.
www/i18n/locale-en.json
+
2
−
1
View file @
f0aa5e65
...
...
@@ -843,8 +843,9 @@
"EXAMPLE_BUTTON_TEXT_ICON"
:
"Icon"
,
"EXAMPLE_BUTTON_TEXT_WIDTH"
:
"Width"
,
"EXAMPLE_BUTTON_TEXT_WIDTH_HELP"
:
"eg: 200px, 50%"
,
"EXAMPLE_BUTTON_ICON_
CESIUM"
:
"Cesium logo
"
,
"EXAMPLE_BUTTON_ICON_
NONE"
:
"No icon
"
,
"EXAMPLE_BUTTON_ICON_DUNITER"
:
"Duniter logo"
,
"EXAMPLE_BUTTON_ICON_CESIUM"
:
"Cesium logo"
,
"EXAMPLE_BUTTON_ICON_G1_COLOR"
:
"Ğ1 logo"
,
"EXAMPLE_BUTTON_ICON_G1_BLACK"
:
"Ğ1 logo (outline)"
}
...
...
This diff is collapsed.
Click to expand it.
www/i18n/locale-fr-FR.json
+
2
−
1
View file @
f0aa5e65
...
...
@@ -843,8 +843,9 @@
"EXAMPLE_BUTTON_TEXT_ICON"
:
"Icône"
,
"EXAMPLE_BUTTON_TEXT_WIDTH"
:
"Largeur"
,
"EXAMPLE_BUTTON_TEXT_WIDTH_HELP"
:
"Exemple: 200px, 50%"
,
"EXAMPLE_BUTTON_ICON_
CESIUM"
:
"Logo Cesium
"
,
"EXAMPLE_BUTTON_ICON_
NONE"
:
"Aucune
"
,
"EXAMPLE_BUTTON_ICON_DUNITER"
:
"Logo Duniter"
,
"EXAMPLE_BUTTON_ICON_CESIUM"
:
"Logo Cesium"
,
"EXAMPLE_BUTTON_ICON_G1_COLOR"
:
"Logo Ğ1"
,
"EXAMPLE_BUTTON_ICON_G1_BLACK"
:
"Logo Ğ1 (noir)"
}
...
...
This diff is collapsed.
Click to expand it.
www/js/api/app.js
+
10
−
5
View file @
f0aa5e65
...
...
@@ -121,6 +121,9 @@ angular.module('cesium-api', ['ionic', 'ionic-material', 'ngMessages', 'pascalpr
html
:
undefined
,
showParameters
:
false
,
// hide integration parameters, by default
icons
:
[
{
label
:
'
API.DOC.TRANSFER.EXAMPLE_BUTTON_ICON_NONE
'
},
{
label
:
'
API.DOC.TRANSFER.EXAMPLE_BUTTON_ICON_DUNITER
'
,
filename
:
'
../img/logo_duniter_32px.png
'
...
...
@@ -146,7 +149,7 @@ angular.module('cesium-api', ['ionic', 'ionic-material', 'ngMessages', 'pascalpr
width
:
undefined
}
};
$scope
.
transferButton
.
style
.
icon
=
$scope
.
transferButton
.
icons
[
0
];
$scope
.
transferButton
.
style
.
icon
=
$scope
.
transferButton
.
icons
[
1
/*Duniter icon*/
];
$scope
.
transferDemoUrl
=
$rootScope
.
rootPath
+
$state
.
href
(
'
api.transfer
'
,
angular
.
merge
({},
$scope
.
transferData
,
{
demo
:
true
,
redirect_url
:
$rootScope
.
rootPath
+
'
#/app/home?service=payment&result={tx}
'
,
...
...
@@ -199,7 +202,7 @@ angular.module('cesium-api', ['ionic', 'ionic-material', 'ngMessages', 'pascalpr
// Compute HTML: advanced button
else
{
html
=
'
<a href="
'
+
url
+
'
">
\n
'
+
'
<div style="border-radius: 5px; min-height: 42px; text-align: center; padding: 5px;
'
;
'
<div style="border-radius: 5px; min-height: 42px; text-align: center; padding: 5px;
line-height: 30px;
'
;
if
(
$scope
.
transferButton
.
style
.
width
)
{
html
+=
'
max-width:
'
+
$scope
.
transferButton
.
style
.
width
+
'
;
'
;
}
...
...
@@ -209,9 +212,11 @@ angular.module('cesium-api', ['ionic', 'ionic-material', 'ngMessages', 'pascalpr
if
(
$scope
.
transferButton
.
style
.
fontColor
)
{
html
+=
'
color:
'
+
$scope
.
transferButton
.
style
.
fontColor
+
'
;
'
;
}
html
+=
'
">
\n
'
+
'
<img style="vertical-align: middle;" src="
'
+
$rootScope
.
rootPath
+
$scope
.
transferButton
.
style
.
icon
.
filename
+
'
">
\n
'
+
'
'
+
$scope
.
transferButton
.
style
.
text
+
'
\n
'
+
html
+=
'
">
\n
'
;
if
(
$scope
.
transferButton
.
style
.
icon
&&
$scope
.
transferButton
.
style
.
icon
.
filename
)
{
html
+=
'
<img style="vertical-align: middle;" src="
'
+
$rootScope
.
rootPath
+
$scope
.
transferButton
.
style
.
icon
.
filename
+
'
">
\n
'
;
}
html
+=
'
'
+
$scope
.
transferButton
.
style
.
text
+
'
\n
'
+
'
</div>
\n
'
+
'
</a>
'
;
}
...
...
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