Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Pixel Humain
co2
Commits
73921f49
Commit
73921f49
authored
May 20, 2019
by
Tibor Katelbach
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tab switcher
parent
cc7d3c7e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
63 additions
and
7 deletions
+63
-7
assets/js/co.js
assets/js/co.js
+12
-1
components/CommunecterController.php
components/CommunecterController.php
+30
-3
views/docs/index.php
views/docs/index.php
+21
-3
No files found.
assets/js/co.js
View file @
73921f49
...
...
@@ -1101,6 +1101,7 @@ var urlCtrl = {
// location.hash.indexOf("#default.directory"), CoAllReadyLoad);
onchangeClick
=
false
;
navInSlug
=
false
;
mylog
.
log
(
"
loadByHash
"
,
hash
,
back
);
if
(
typeof
globalTheme
!=
"
undefined
"
&&
globalTheme
==
"
network
"
){
mylog
.
log
(
"
globalTheme
"
,
globalTheme
);
...
...
@@ -1623,7 +1624,17 @@ function showAjaxPanel (url,title,icon, mapEnd , urlObj) {
/*setTimeout(function(){$("#loadingModal").css({"opacity": 0.});}, 500);
setTimeout(function(){$("#loadingModal").css({"opacity": 0.5});}, 1500);*/
$
(
"
#loadingModal
"
).
css
({
"
opacity
"
:
0.9
});
getAjax
(
dest
,
url
,
function
(
data
){
params
=
null
;
if
(
activeModuleId
==
"
costum
"
){
mylog
.
log
(
"
costum LBH
"
,
costum
.
slug
,
contextData
);
if
(
contextData
&&
contextData
.
id
)
params
=
{
costumSlug
:
costum
.
slug
,
costumId
:
contextData
.
id
,
costumType
:
contextData
.
type
};
else
params
=
{
costumSlug
:
costum
.
slug
};
}
ajaxPost
(
dest
,
url
,
params
,
function
(
data
){
if
(
dest
!=
themeObj
.
mainContainer
)
$
(
"
.subModuleTitle
"
).
html
(
""
);
...
...
components/CommunecterController.php
View file @
73921f49
...
...
@@ -634,6 +634,9 @@ class CommunecterController extends Controller
"siteurl"
=>
array
(
"incnbclick"
=>
array
(
'href'
=>
"ph/co2/siteurl/incnbclick"
)
),
"co"
=>
array
(
"index"
=>
array
(
'href'
=>
"ph/costum/co/index"
)
),
"cooperation"
=>
array
(
"getcoopdata"
=>
array
(
'href'
=>
"ph/co2/cooperation/getcoopdata"
),
"savevote"
=>
array
(
'href'
=>
"ph/co2/cooperation/savevote"
),
...
...
@@ -667,14 +670,38 @@ class CommunecterController extends Controller
),
);
function
initPage
(){
//review the value of the userId to check loosing session
//creates an issue with Json requests : to clear add josn:true on the page definition here
//if( Yii::app()->request->isAjaxRequest && (!isset( $page["json"] )) )
//echo "<script type='text/javascript'> userId = '".Yii::app()->session['userId']."'; var blackfly = 'sosos';</script>";
//bug du double load
//echo "<script type='text/javascript'> alert('CommunecterController initPage ".@$_POST["costumSlug"]." =? ".@Yii::app()->session[ "costum" ][ "slug" ]."'); </script>";
if
(
isset
(
$_POST
[
"costumSlug"
])
){
if
(
isset
(
$_POST
[
"costumId"
])
&&
isset
(
$_POST
[
"costumId"
])
){
Costum
::
init
(
null
,
$_POST
[
"costumId"
],
$_POST
[
"costumType"
]
);
}
//pas d'element fourni juste un slug de costum
else
Costum
::
init
(
null
,
$_POST
[
"costumSlug"
]
);
//var_dump(Yii::app()->session[ "costum" ]);
}
// if( isset($_POST["costumSlug"]) && @Yii::app()->session[ "costum" ][ "slug" ] != $_POST["costumSlug"] )
// {
// //echo "<script type='text/javascript'> alert('CommunecterController reload init ".@$_POST["costumSlug"]." != ".@Yii::app()->session[ "costum" ][ "slug" ]."'); </script>";
// //cas ou l'on se base sur un element qui pointra vers un template costum
// if( isset($_POST["costumId"]) && isset($_POST["costumId"]) ){
// Costum::init( null, $_POST["costumId"], $_POST["costumType"] );
// var_dump(Yii::app()->session[ "costum" ]);
// //echo "<script type=Yii::app()->session[ "costum" ]);'text/javascript'> alert('set session ".@$_POST["costumId"]." ".@$_POST["costumType"]."'); </script>";
// }
// //pas d'element fourni juste un slug de costum
// else
// Costum::init( null, $_POST["costumSlug"] );
// }
Yii
::
app
()
->
params
[
"version"
]
=
$this
->
version
;
if
(
@
$_GET
[
"theme"
]
){
Yii
::
app
()
->
theme
=
$_GET
[
"theme"
];
...
...
views/docs/index.php
View file @
73921f49
<?php
$cssJS
=
array
(
'/plugins/jQuery-Knob/js/jquery.knob.js'
,
'/plugins/jQuery-Smart-Wizard/js/jquery.smartWizard.js'
,
//'/plugins/jQuery-Smart-Wizard/styles/smart_wizard.css',
// SHOWDOWN
'/plugins/showdown/showdown.min.js'
,
// MARKDOWN
'/plugins/to-markdown/to-markdown.js'
);
HtmlHelper
::
registerCssAndScriptsFiles
(
$cssJS
,
Yii
::
app
()
->
request
->
baseUrl
);
?>
<style
type=
"text/css"
>
#docs-main-container
{
position
:
absolute
;
...
...
@@ -160,7 +173,7 @@
<?php
if
(
@
Yii
::
app
()
->
session
[
"costum"
]
&&
@
Yii
::
app
()
->
session
[
"costum"
][
"docTpl"
]){
$this
->
renderPartial
(
Yii
::
app
()
->
session
[
"costum"
][
"docTpl"
]
,
false
,
true
);
$this
->
renderPartial
(
Yii
::
app
()
->
session
[
"costum"
][
"docTpl"
]
,
true
);
}
else
{
?>
<div
id=
"docs-main-container"
>
<div
id=
"header-doc"
class=
"shadow2"
>
...
...
@@ -336,6 +349,8 @@ var page="<?php echo @$page ?>";
var
dir
=
"
<?php
echo
@
$dir
?>
"
;
jQuery
(
document
).
ready
(
function
()
{
mylog
.
log
(
"
render
"
,
"
co2.views.docs.index
"
);
dir
=
(
dir
==
""
)
?
mainLanguage
:
dir
;
if
(
page
!=
""
)
initDocs
(
page
,
dir
);
...
...
@@ -343,7 +358,7 @@ jQuery(document).ready(function() {
initDocs
(
"
welcome
"
,
mainLanguage
);
$
(
"
.link-docs-menu
"
).
off
().
on
(
"
click
"
,
function
(){
alert
(
"
.link-docs-menu
"
);
if
(
$
(
this
).
hasClass
(
"
down-menu
"
)){
$
(
"
#menu-left > ul > li > a
"
).
removeClass
(
"
active
"
).
find
(
"
i
"
).
removeClass
(
"
fa-angle-down
"
).
addClass
(
"
fa-angle-right
"
);
$
(
"
.subMenu .link-docs-menu
"
).
removeClass
(
"
active
"
);
...
...
@@ -371,6 +386,9 @@ jQuery(document).ready(function() {
//else
navInDocs
(
$
(
this
).
data
(
"
type
"
),
$
(
this
).
data
(
"
dir
"
),
$
(
this
).
data
(
"
get
"
));
});
$
(
"
#show-menu-xs
"
).
click
(
function
(){
if
(
!
$
(
this
).
hasClass
(
"
show-dir
"
)){
$
(
this
).
addClass
(
"
show-dir
"
).
data
(
"
title
"
,
"
<?php
echo
Yii
::
t
(
"common"
,
"Close"
)
?>
"
).
find
(
"
i
"
).
removeClass
(
"
fa-chevron-right
"
).
addClass
(
"
fa-times
"
);
...
...
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