Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
neuro-images
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Александр Чаплыгин
neuro-images
Commits
5b7241cf
Commit
5b7241cf
authored
Jun 08, 2022
by
Александр Чаплыгин
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
логика выставления текущего состоянии по архивным данным и данным из черновика
parent
ef1d50d0
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
52 additions
and
14 deletions
+52
-14
styles-main.css
src/public/css/styles-main.css
+8
-3
fotos.dat
src/public/fotos.dat
+2
-0
common.js
src/public/js/common.js
+2
-1
script-main.js
src/public/js/script-main.js
+0
-0
Index.php
src/src/App/Action/Admin/Index.php
+17
-5
Main.php
src/src/App/Action/Admin/Main.php
+17
-3
main.phtml
src/templates/app/main.phtml
+6
-2
No files found.
src/public/css/styles-main.css
View file @
5b7241cf
...
...
@@ -22,6 +22,10 @@
overflow-y
:
auto
;
}
.b-list_folders.active
{
display
:
block
;
}
.b-list_folders-item
{
position
:
relative
;
...
...
@@ -153,17 +157,18 @@
border-radius
:
4px
;
overflow
:
hidden
;
cursor
:
pointer
;
height
:
450px
;
height
:
calc
(
50vh
-
30px
)
;
}
.b-foto_inner-
emul
.b-foto_inner-
fict
{
height
:
450px
;
height
:
calc
(
50vh
-
30px
)
;
}
.b-foto_inner.single-row
{
height
:
auto
;
max-height
:
calc
(
100vh
-
60px
);
}
.b-folder-content.has-selected
.b-foto_inner.paired
{
...
...
src/public/fotos.dat
View file @
5b7241cf
{"10-foto":{"1":["a1654670926-1.jpg","a1654670926-10.jpg"],"2":["a1654670926-2.jpg","a1654670926-3.jpg"],"3":["a1654670926-4.jpg","a1654670926-5.jpg"]},"2-foto":{"1":["a1654670926-1.jpg","a1654670926-2.jpg"]},"3-foto":{"1":["a1654665594-1.jpg","a1654665594-2.jpg"]},"4-foto":{"1":["a1654663117-1.jpg","a1654663117-2.jpg"]},"5-foto":"","6-foto":{"1":["a1654670995-1.jpg","a1654670995-3.jpg"],"2":["a1654670995-2.jpg","a1654670995-4.jpg"]},"7-foto":"","8-foto":"","9-foto":"","B-KazwCAcxM":{"1":["a1654670926-1.jpg","a1654670926-4.jpg"],"2":["a1654670926-2.jpg","a1654670926-3.jpg"]},"B24WGzEo8v_":"","B9RwSi4oPAh":""}
\ No newline at end of file
src/public/js/common.js
View file @
5b7241cf
$
(
document
).
ready
(
function
(){
console
.
log
(
'AAA common.js'
);
//
console.log('AAA common.js');
});
\ No newline at end of file
src/public/js/script-main.js
View file @
5b7241cf
This diff is collapsed.
Click to expand it.
src/src/App/Action/Admin/Index.php
View file @
5b7241cf
...
...
@@ -45,13 +45,24 @@ class Index extends Common
{
chdir
(
'public/fotos'
);
$dir
=
getcwd
();
$dir
_new
=
getcwd
();
chdir
(
'../..'
);
$folders
=
scandir
(
$dir
);
$folders
_new
=
scandir
(
$dir_new
);
foreach
(
$folders
as
$key
=>
$folder_name
)
{
chdir
(
'public/fotos-arch'
);
$dir_arch
=
getcwd
();
chdir
(
'../..'
);
$folders_arch
=
scandir
(
$dir_arch
);
foreach
(
$folders_new
as
$key
=>
$folder_name
)
{
if
(
strpos
(
$folder_name
,
'.'
)
>
-
1
)
{
unset
(
$folders_new
[
$key
]);
}
}
foreach
(
$folders_arch
as
$key
=>
$folder_name
)
{
if
(
strpos
(
$folder_name
,
'.'
)
>
-
1
)
{
unset
(
$folders
[
$key
]);
unset
(
$folders
_arch
[
$key
]);
}
}
...
...
@@ -70,7 +81,8 @@ class Index extends Common
'lang'
=>
$request
->
getAttribute
(
'layoutInfo'
)
->
getLang
(),
'colors_active'
=>
$this
->
container
->
get
(
'config'
)[
'foto_conf'
][
'colors_active'
],
'pairs_count'
=>
$this
->
container
->
get
(
'config'
)[
'foto_conf'
][
'pairs_count'
],
'folders'
=>
$folders
,
'folders_new'
=>
$folders_new
,
'folders_arch'
=>
$folders_arch
,
'dir'
=>
$dir
,
];
...
...
src/src/App/Action/Admin/Main.php
View file @
5b7241cf
...
...
@@ -68,7 +68,8 @@ class Main extends Common
$response
=
$this
->
loadFolder
(
$request
);
break
;
case
self
::
LOAD_FOLDERS_LIST
:
$response
=
$this
->
loadFoldersList
(
$request
);
//$response = $this->loadFoldersList($request);
$response
=
$this
->
getArchiveData
(
$request
);
break
;
default
:
}
...
...
@@ -178,7 +179,6 @@ class Main extends Common
return
new
JsonResponse
(
$resp
);
}
private
function
loadFolder
(
ServerRequestInterface
$request
)
{
$data
=
$request
->
getParsedBody
();
...
...
@@ -215,7 +215,6 @@ class Main extends Common
return
$response
;
}
private
function
loadFoldersList
(
ServerRequestInterface
$request
)
{
$data
=
$request
->
getParsedBody
();
...
...
@@ -258,4 +257,18 @@ class Main extends Common
return
$response
;
}
private
function
getArchiveData
(
ServerRequestInterface
$request
)
{
chdir
(
'public/'
);
$file_name
=
"fotos.dat"
;
$archive_data
=
json_decode
(
file_get_contents
(
$file_name
),
true
);
chdir
(
'..'
);
$resp
=
[
'archive'
=>
$archive_data
];
return
new
JsonResponse
(
$resp
);
}
}
\ No newline at end of file
src/templates/app/main.phtml
View file @
5b7241cf
...
...
@@ -39,7 +39,8 @@ $form_load_link = $this->url('adm.main.loadfolder');
$form_loadlist_link
=
$this
->
url
(
'adm.main.loadfolderslist'
);
$colors_active
=
$this
->
colors_active
;
$folders
=
$this
->
folders
;
$folders_new
=
$this
->
folders_new
;
$folders_arch
=
$this
->
folders_arch
;
$dir
=
$this
->
dir
;
?>
...
...
@@ -54,12 +55,15 @@ $dir = $this->dir;
</select>
<ul
class=
"b-list_folders new"
data-type=
"new"
>
<?php
foreach
(
$folders
as
$folder
)
:
?>
<?php
foreach
(
$folders
_new
as
$folder
)
:
?>
<li
class=
"b-list_folders-item"
data-folder=
"
<?=
$folder
?>
"
>
<?=
$folder
?>
<b></b></li>
<?php
endforeach
;
?>
</ul>
<ul
class=
"b-list_folders arch"
data-type=
"arch"
>
<?php
foreach
(
$folders_arch
as
$folder
)
:
?>
<li
class=
"b-list_folders-item"
data-folder=
"
<?=
$folder
?>
"
>
<?=
$folder
?>
<b></b></li>
<?php
endforeach
;
?>
</ul>
<form
id=
"load-folders-list-form"
action=
"
<?=
$form_loadlist_link
?>
"
method=
"POST"
></form>
...
...
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