Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Eteri
erp5
Commits
337ce1d6
Commit
337ce1d6
authored
Apr 10, 2013
by
Lingnan Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make the code looks better
parent
73e7dcd5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
28 deletions
+22
-28
bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/Presentation_renderSlidePage.xml
...em/portal_skins/erp5_dms/Presentation_renderSlidePage.xml
+22
-28
No files found.
bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/Presentation_renderSlidePage.xml
View file @
337ce1d6
...
@@ -61,6 +61,7 @@ return """\n
...
@@ -61,6 +61,7 @@ return """\n
var slide_current_page=""\n
var slide_current_page=""\n
var slide_current_page_number=0\n
var slide_current_page_number=0\n
var current_page_is_img=true\n
var current_page_is_img=true\n
var slides_total_number=0\n
img_file_name_list=[]\n
img_file_name_list=[]\n
text_file_name_list=[]\n
text_file_name_list=[]\n
\n
\n
...
@@ -155,37 +156,30 @@ function renderNavigation(){\n
...
@@ -155,37 +156,30 @@ function renderNavigation(){\n
resetNavigation("Graphics","graphics_slide","graphics_slide_img","graphics","graphics hidden");\n
resetNavigation("Graphics","graphics_slide","graphics_slide_img","graphics","graphics hidden");\n
}\n
}\n
\n
\n
function redirectPresentationPage(slide_total_pages){\n
function checkTheSelectionFieldAndGoToNewSlide(next_page_number,file_list){\n
//if entered number bigger than total number, go to last page, else incorrect number go to first page\n
if( next_page_number>1
&&
next_page_number
<slide_total_number
){\n
real_page_number=
next_page_number-1;\n
goToNewSlide(file_list[real_page_number]);\n
}\n
else
if(next_page_number
>
=slide_total_number){\n
real_page_number=slide_total_pages-1\n
goToNewSlide(file_list[real_page_number]);\n
}\n
else{\n
goToNewSlide(file_list[0]);\n
}\n
}\n
\n
function redirectPresentationPage(){\n
next_page_number = $("#slide_selection_index").val()\n
next_page_number = $("#slide_selection_index").val()\n
//Graphic pages\n
//Graphic pages\n
if(current_page_is_img){\n
if(current_page_is_img){\n
//if entered number bigger than total number, go to last page, else incorrect number go to first page\n
checkTheSelectionFieldAndGoToNewSlide(next_page_number,img_file_name_list)\n
if( next_page_number>1
&&
next_page_number
<slide_total_pages
){\n
real_page_number=
next_page_number-1;\n
goToNewSlide(img_file_name_list[real_page_number]);\n
}\n
else
if(next_page_number
>
=slide_total_pages){\n
real_page_number=slide_total_pages-1\n
goToNewSlide(img_file_name_list[real_page_number]);\n
}\n
else{\n
goToNewSlide(img_file_name_list[0]);\n
}\n
}\n
}\n
//Text pages\n
//Text pages\n
else{\n
else{\n
//if entered number bigger than total number, go to last page, else incorrect number go to first page\n
checkTheSelectionFieldAndGoToNewSlide(next_page_number,text_file_name_list)\n
if( next_page_number>1
&&
next_page_number
<slide_total_pages
){\n
real_page_number=
next_page_number-1;\n
goToNewSlide(text_file_name_list[real_page_number]);\n
}\n
else
if(next_page_number
>
=slide_total_pages){\n
real_page_number=slide_total_pages-1\n
goToNewSlide(text_file_name_list[real_page_number]);\n
}\n
else{\n
goToNewSlide(text_file_name_list[0]);\n
}\n
}\n
}\n
}\n
}\n
\n
\n
...
@@ -209,11 +203,11 @@ $(document).ready(function() {\n
...
@@ -209,11 +203,11 @@ $(document).ready(function() {\n
file_name_list=getFileNameList();\n
file_name_list=getFileNameList();\n
img_file_name_list=getImgFileNameList(file_name_list);\n
img_file_name_list=getImgFileNameList(file_name_list);\n
text_file_name_list=getTextFileNameList(file_name_list);\n
text_file_name_list=getTextFileNameList(file_name_list);\n
slide_total_
pages
=file_name_list.length/2;\n
slide_total_
number
=file_name_list.length/2;\n
$("#slides_total_number").text(slide_total_
pages
);\n
$("#slides_total_number").text(slide_total_
number
);\n
$("#slide_selection_index").keyup(function(event) {\n
$("#slide_selection_index").keyup(function(event) {\n
if (event.keyCode==13) {\n
if (event.keyCode==13) {\n
redirectPresentationPage(
slide_total_pages
)\n
redirectPresentationPage()\n
}\n
}\n
});\n
});\n
goToNewSlide(img_file_name_list[0]);\n
goToNewSlide(img_file_name_list[0]);\n
...
...
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