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
Jean-Baptiste HUBER
co2
Commits
1c3bc0b5
Commit
1c3bc0b5
authored
Feb 04, 2019
by
Raph El
Browse files
hotfix
parent
9229d7e0
Changes
1
Hide whitespace changes
Inline
Side-by-side
views/custom/laRaffinerie.php
View file @
1c3bc0b5
<?php
$backColor1
=
"#e94635"
;
$backColor2
=
"#01809b"
;
$cssAnsScriptFilesTheme
=
array
(
// SHOWDOWN
'/plugins/showdown/showdown.min.js'
,
//MARKDOWN
'/plugins/to-markdown/to-markdown.js'
,
'/plugins/fullcalendar/fullcalendar/fullcalendar.min.js'
,
'/plugins/fullcalendar/fullcalendar/fullcalendar.css'
,
'/plugins/fullcalendar/fullcalendar/locale/'
.
Yii
::
app
()
->
language
.
'.js'
,
);
HtmlHelper
::
registerCssAndScriptsFiles
(
$cssAnsScriptFilesTheme
,
Yii
::
app
()
->
request
->
baseUrl
);
?>
<style
type=
"text/css"
>
...
...
@@ -284,6 +298,10 @@ $projectList = [];
$linksElt
=
Element
::
getAllLinks
(
$elt
[
"links"
],
$type
,
$idElt
);
array_push
(
$projectList
,
$idElt
);
$hasRC
=
(
@
$elt
[
"hasRC"
]
)
?
"true"
:
"false"
;
$canEdit
=
"false"
;
$loadChat
=
StringHelper
::
strip_quotes
(
$elt
[
"name"
]);
if
(
!
empty
(
$elt
)
&&
!
empty
(
$elt
[
"links"
])){
echo
"
...
...
@@ -440,9 +458,9 @@ $projectList = [];
$description
=
substr_replace
(
$description
,
' <span class="more"> ...</span><span class="hiddn">'
,
240
,
0
);
$description
.
=
'</span>'
;
?>
<div id="
descriptionMarkdown
"
class=
"hidden"
>
<?php
echo
(
empty
(
$description
)
?
""
:
$description
);
?>
</div>
<div
class=
"projectDescription customBlock"
>
<
p></p>
<?php
//echo $description; ?
>
<
div
id=
"descriptionAbout"
></div
>
<button
class=
"customBtn"
>
More
</button>
</div>
...
...
@@ -453,7 +471,13 @@ $projectList = [];
<div
class=
"projectOptions customBlock"
>
<div
class=
"row"
>
<
div
class
=
"col-sm-4"
><
a
class
=
"customBtn"
href
=
"#"
>
Messagerie
</
a
></
div
>
<div
class=
"col-sm-4"
>
<button
type=
"button"
onclick=
"javascript:rcObj.loadChat('
<?php
echo
$loadChat
;
?>
','
<?php
echo
$type
?>
',
<?php
echo
$canEdit
;
?>
,
<?php
echo
$hasRC
;
?>
, elt )"
class=
"customBtn"
id=
"open-rocketChat"
style=
"border-right:0px!important;"
>
<i
class=
"fa fa-comments elChatNotifs"
></i>
<?php
echo
Yii
::
t
(
"cooperation"
,
"Chat"
);
?>
</button>
</div>
<div
class=
"col-sm-4"
><a
class=
"customBtn"
href=
"#"
>
Contact
</a></div>
<div
class=
"col-sm-4"
><a
class=
"customBtn"
href=
"#"
>
S'inscrire au projet
</a></div>
</div>
...
...
@@ -482,26 +506,26 @@ $projectList = [];
<div
id=
"journal"
class=
"tab-pane active"
>
Journal
</div>
<div
id=
"agenda"
class=
"tab-pane"
>
<?php
//var_dump($eventsList
);
foreach ($eventsList as $keyE => $idProject){
$event
=
array
(
);
foreach
(
$eventsList
as
$keyE
=>
$idProject
){
$event
=
Element
::
getElementById
(
$idProject
,
Event
::
COLLECTION
);
//$linksElt = Element::getAllLinks($elt["links"], $type, $idElt);
//var_dump($event);
?>
<div
class=
"customBlock customBlockEvent row"
style=
"padding: 20px; border: 1px solid #ddd; margin-bottom: 20px;"
data-startDate=
"
<?php
echo
$event
[
'startDate'
]
->
sec
?>
"
>
<div
class=
"col-xs-12 col-md-5"
>
<div class="customBlockImg" style="background-image: url(<?php echo Yii::app()->createUrl($event['
profilImageUrl
']) ?>);">
<div
class=
"customBlockImg"
style=
"background-image: url(
<?php
echo
Yii
::
app
()
->
createUrl
(
@
$event
[
'profilImageUrl'
])
?>
);"
>
</div>
</div>
<div
class=
"col-xs-12 col-md-7"
>
<h4
class=
"date"
>
<?php
echo
$event
[
'startDate'
]
->
sec
?>
</h4>
<h4>
<?php
echo
$event
[
'name'
]
?>
</h4>
<p><?php echo $event['
shortDescription
'] ?></p>
<p>
<?php
echo
@
$event
[
'shortDescription'
]
?>
</p>
</div>
</div>
<?php
}
}
?>
</div>
<div
id=
"documents"
class=
"tab-pane"
>
Documents
</div>
...
...
@@ -516,13 +540,13 @@ $projectList = [];
<script>
$
(
'
.projectDescription button
'
).
click
(
function
(){
if
(
$
(
this
).
hasClass
(
'
open
'
)){
$('
.
projectD
escription
.
hiddn
').hide();
$('
.
projectD
escription
.
more
').show();
$
(
'
#d
escription
About
.hiddn
'
).
hide
();
$
(
'
#d
escription
About
.more
'
).
show
();
$
(
this
).
removeClass
(
'
open
'
).
html
(
'
MORE
'
);
}
else
{
$('
.
projectD
escription
.
hiddn
').show();
$('
.
projectD
escription
.
more
').hide();
$
(
'
#d
escription
About
.hiddn
'
).
show
();
$
(
'
#d
escription
About
.more
'
).
hide
();
$
(
this
).
addClass
(
'
open
'
).
html
(
'
LESS
'
);
}
});
...
...
@@ -531,18 +555,35 @@ $projectList = [];
<script
type=
"text/javascript"
>
var
elt
=
<?php
echo
json_encode
(
$elt
);
?>
;
var links = <?php echo json_encode($linksElt); ?> ;
var
type
=
<?php
echo
json_encode
(
$type
);
?>
;
var
idElt
=
<?php
echo
json_encode
(
$idElt
);
?>
;
//var links =
<?php
echo
json_encode
(
$linksElt
);
?>
;
var
events
=
<?php
echo
json_encode
(
$event
);
?>
;
jQuery
(
document
).
ready
(
function
()
{
mylog
.
log
(
"
elt
"
,
elt
);
mylog.log("links", links);
mylog
.
log
(
"
elt
"
,
type
,
idElt
);
//mylog.log("links", links);
setTitle
(
"
La Raffinerie
"
);
//feedProject(elt);
selectProject
();
$
(
'
.projectNav .projectNavFirstLvl .linkOrganization
'
).
click
();
initDescs
();
loadMyStream
(
type
,
idElt
);
});
function
initDescs
()
{
mylog
.
log
(
"
inintDescs
"
);
var
descHtml
=
"
<i>
"
+
trad
.
notSpecified
+
"
</i>
"
;
if
(
$
(
"
#descriptionMarkdown
"
).
html
().
length
>
0
){
descHtml
=
dataHelper
.
markdownToHtml
(
$
(
"
#descriptionMarkdown
"
).
html
())
;
}
$
(
"
#descriptionAbout
"
).
html
(
descHtml
);
mylog
.
log
(
"
descHtml
"
,
descHtml
);
}
function
selectProject
(){
$
(
"
.projectNav, .projectChildren
"
).
on
(
'
click
'
,
'
.linkMenu
'
,
function
(){
var
key
=
$
(
this
).
data
(
"
key
"
);
...
...
@@ -557,9 +598,8 @@ function selectProject(){
data
:
{},
dataType
:
"
json
"
,
}).
done
(
function
(
data
){
//$('
.
ret
').html(ret);
feedProject
(
data
);
loadMyStream
(
col
,
key
);
}).
fail
(
function
(
error
)
{
//mylog.( "error : " + error.toSource() );
$
(
'
.ret
'
).
html
(
error
);
...
...
@@ -583,11 +623,15 @@ function feedProject(el){
var
more
=
'
<span class="more"> ...</span><span class="hiddn">
'
;
var
description
=
[
el
.
map
.
description
.
slice
(
0
,
position
),
more
,
el
.
map
.
description
.
slice
(
position
)].
join
(
''
)
+
"
</span>
"
;
//description = description
$(".projectDescription").show();
$(".projectDescription p").html(description);
$
(
"
#descriptionAbout
"
).
show
();
if
(
description
.
length
>
0
){
descHtml
=
dataHelper
.
markdownToHtml
(
description
)
;
}
$
(
"
#descriptionAbout
"
).
html
(
descHtml
);
}
else
{
$("
.projectD
escription").hide();''
$
(
"
#d
escription
About
"
).
hide
();
''
}
// banner image
...
...
@@ -646,6 +690,21 @@ function getBaseUrl(){
function
createUrl
(
url
){
return
getBaseUrl
()
+
url
;
}
function
loadMyStream
(
typeElt
,
id
){
var
url
=
"
news/co/index/type/
"
+
typeElt
+
"
/id/
"
+
idElt
;
///date/"+dateLimit;
setTimeout
(
function
(){
//attend que le scroll retourn en haut (kscrollto)
showLoader
(
'
#journal
'
);
ajaxPost
(
'
#journal
'
,
baseUrl
+
'
/
'
+
url
,
{
nbCol
:
1
,
inline
:
true
},
function
(){
loadLiveNow
();
},
"
html
"
);
},
700
);
}
/*
function selectProject(){
$(".linkMenu").click(function(){
...
...
Write
Preview
Supports
Markdown
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