.. include:: definitions.txt Javascript code files ********************* .. contents:: Function content :depth: 3 .. DLGBOXES_GENERIC .. _sec_L2_dlgboxes_generic.js: Functions in file dlgboxes_generic.js ===================================== .. _sec_L3_media_update_progress_dialogbox: .. rst-class:: html-toggle media_update_progress_dialogbox() --------------------------------- .. js:function:: media_update_progress_dialogbox(newim_cnt,newvi_cnt,putbim_cnt,putbvi_cnt,uname,sid,wdir) :param Integer newim_cnt: number of new images, :param Integer newvi_cnt: number of new videos, :param Integer putbim_cnt: number of images which are put back (after removal, and original image is still available), :param Integer putbvi_cnt: number of videos which are put back (after removal, and original video is still available), :param String uname: username, :param String sid: session identification number, :param String wdir: working directory. :returns: Void .. _sec_L4_media_update_progress_dialogbox: .. rst-class:: html-toggle Source code ^^^^^^^^^^^ .. literalinclude:: ..\..\..\js\myjs\dlgboxes_generic.js :language: javascript :start-after: media_update_progress_dialogbox_Begin :end-before: media_update_progress_dialogbox_End .. DLGBOXES_PRIVATE .. _sec_L2_dlgboxes_private.js: Functions in file dlgboxes_private.js ===================================== .. _sec_L3_user_menu_dialogbox: .. rst-class:: html-toggle user_menu_dialogbox() --------------------- .. js:function:: user_menu_dialogbox(event) :param Object parent: JQuery Event Object :returns: .. _sec_L4_user_menu_dialogbox: .. rst-class:: html-toggle Source code ^^^^^^^^^^^ .. literalinclude:: ..\..\..\js\myjs\dlgboxes_private.js :language: javascript :start-after: user_menu_dialogbox_Begin :end-before: user_menu_dialogbox_End .. _sec_L3_logout: .. rst-class:: html-toggle logout() -------- .. js:function:: logout(cname) Function is called by :js:func:`user_menu_dialogbox()` :param String cname: target URL (webpage) after logging off. :returns: .. _sec_L4_logout: .. rst-class:: html-toggle Source code ^^^^^^^^^^^ .. literalinclude:: ..\..\..\js\myjs\dlgboxes_private.js :language: javascript :start-after: logout_Begin :end-before: logout_End .. _sec_L3_adminuser_dialogbox: .. rst-class:: html-toggle adminuser_dialogbox() --------------------- .. js:function:: adminuser_dialogbox() :param: :returns: .. _sec_L4_adminuser_dialogbox: .. rst-class:: html-toggle Source code ^^^^^^^^^^^ .. literalinclude:: ..\..\..\js\myjs\dlgboxes_private.js :language: javascript :start-after: adminuser_dialogbox_Begin :end-before: adminuser_dialogbox_End .. _sec_L3_admininistrator_tools_dialogbox: .. rst-class:: html-toggle admininistrator_tools_dialogbox() --------------------------------- .. js:function:: admininistrator_tools_dialogbox() :param: :returns: .. _sec_L4_admininistrator_tools_dialogbox: .. rst-class:: html-toggle Source code ^^^^^^^^^^^ .. literalinclude:: ..\..\..\js\myjs\dlgboxes_private.js :language: javascript :start-after: admininistrator_tools_dialogbox_Begin :end-before: admininistrator_tools_dialogbox_End .. _sec_L3_file_viewer_dialogbox: .. rst-class:: html-toggle file_viewer_dialogbox() ----------------------- .. js:function:: file_viewer_dialogbox() Function is called by :js:func:`admininistrator_tools_dialogbox()` :param: :returns: .. _sec_L4_file_viewer_dialogbox: .. rst-class:: html-toggle Source code ^^^^^^^^^^^ .. literalinclude:: ..\..\..\js\myjs\dlgboxes_private.js :language: javascript :start-after: file_viewer_dialogbox_Begin :end-before: file_viewer_dialogbox_End .. _sec_L3_file_viewer: .. rst-class:: html-toggle file_viewer() ------------- .. js:function:: file_viewer(fname) Function is called by :js:func:`file_viewer_dialogbox()` :param String fname: filename :returns: .. _sec_L4_file_viewer: .. rst-class:: html-toggle Source code ^^^^^^^^^^^ .. literalinclude:: ..\..\..\js\myjs\dlgboxes_private.js :language: javascript :start-after: file_viewer_Begin :end-before: file_viewer_End .. _sec_L3_system_info_dialogbox: .. rst-class:: html-toggle system_info_dialogbox() ----------------------- .. js:function:: system_info_dialogbox() :param: :returns: .. _sec_L4_system_info_dialogbox: .. rst-class:: html-toggle Source code ^^^^^^^^^^^ .. literalinclude:: ..\..\..\js\myjs\dlgboxes_private.js :language: javascript :start-after: system_info_dialogbox_Begin :end-before: system_info_dialogbox_End .. _sec_L3_mysql_backup_dialogbox: .. rst-class:: html-toggle mysql_backup_dialogbox() ------------------------ .. js:function:: mysql_backup_dialogbox() Function is called by :js:func:`admininistrator_tools_dialogbox()` :param: :returns: .. _sec_L4_mysql_backup_dialogbox: .. rst-class:: html-toggle Source code ^^^^^^^^^^^ .. literalinclude:: ..\..\..\js\myjs\dlgboxes_private.js :language: javascript :start-after: mysql_backup_dialogbox_Begin :end-before: mysql_backup_dialogbox_End .. _sec_L3_mysql_backup: .. rst-class:: html-toggle mysql_backup() -------------- .. js:function:: mysql_backup(data) Function is called by :js:func:`mysql_backup_dialogbox()` :param Object data: callback data object :returns: .. _sec_L4_mysql_backup: .. rst-class:: html-toggle Source code ^^^^^^^^^^^ .. literalinclude:: ..\..\..\js\myjs\dlgboxes_private.js :language: javascript :start-after: mysql_backup_Begin :end-before: mysql_backup_End .. _sec_L3_register_new_user_dialogbox: .. rst-class:: html-toggle register_new_user_dialogbox() ----------------------------- .. js:function:: register_new_user_dialogbox() Function is called by :js:func:`admininistrator_tools_dialogbox()` :param: :returns: .. _sec_L4_register_new_user_dialogbox: .. rst-class:: html-toggle Source code ^^^^^^^^^^^ .. literalinclude:: ..\..\..\js\myjs\dlgboxes_private.js :language: javascript :start-after: register_new_user_dialogbox_Begin :end-before: register_new_user_dialogbox_End .. _sec_L3_register_new_user: .. rst-class:: html-toggle register_new_user() ------------------- .. js:function:: register_new_user(data) Function is called by :js:func:`register_new_user_dialogbox()` :param Object data: callback data object :returns: .. _sec_L4_register_new_user: .. rst-class:: html-toggle Source code ^^^^^^^^^^^ .. literalinclude:: ..\..\..\js\myjs\dlgboxes_private.js :language: javascript :start-after: register_new_user_Begin :end-before: register_new_user_End .. _sec_L3_wachtwoord_wijzigen_dialogbox: .. rst-class:: html-toggle wachtwoord_wijzigen_dialogbox() ------------------------------- .. js:function:: wachtwoord_wijzigen_dialogbox() Function is called by :js:func:`user_menu_dialogbox()` :param: :returns: .. _sec_L4_wachtwoord_wijzigen_dialogbox: .. rst-class:: html-toggle Source code ^^^^^^^^^^^ .. literalinclude:: ..\..\..\js\myjs\dlgboxes_private.js :language: javascript :start-after: wachtwoord_wijzigen_dialogbox_Begin :end-before: wachtwoord_wijzigen_dialogbox_End .. _sec_L3_wachtwoord_wijzigen: .. rst-class:: html-toggle wachtwoord_wijzigen() --------------------- .. js:function:: wachtwoord_wijzigen(data) Function is called by :js:func:`wachtwoord_wijzigen_dialogbox()` :param Object data: callback data object :returns: .. _sec_L4_wachtwoord_wijzigen: .. rst-class:: html-toggle Source code ^^^^^^^^^^^ .. literalinclude:: ..\..\..\js\myjs\dlgboxes_private.js :language: javascript :start-after: wachtwoord_wijzigen_Begin :end-before: wachtwoord_wijzigen_End .. _sec_L2_dlgboxes_public.js: Functions in file dlgboxes_public.js ==================================== .. _sec_L3_adminuser_dialogbox_pub: .. rst-class:: html-toggle adminuser_dialogbox_pub() ------------------------- .. js:function:: adminuser_dialogbox_pub() :param: :returns: .. _sec_L4_adminuser_dialogbox_pub: .. rst-class:: html-toggle Source code ^^^^^^^^^^^ .. literalinclude:: ..\..\..\js\myjs\dlgboxes_public.js :language: javascript :start-after: adminuser_dialogbox_pub_Begin :end-before: adminuser_dialogbox_pub_End .. _sec_L3_login_dialogbox: .. rst-class:: html-toggle login_dialogbox() ----------------- .. js:function:: login_dialogbox(event,params) Function is called by callback function of login button. :param Object event: :param Object params: Parameters for future extensions. For example: placeholder string values for a variety of languages. Now it is undefined |r_arrow| language is Dutch. :returns: Void .. _sec_L4_login_dialogbox: .. rst-class:: html-toggle Source code ^^^^^^^^^^^ .. literalinclude:: ..\..\..\js\myjs\dlgboxes_public.js :language: javascript :start-after: login_dialogbox_Begin :end-before: login_dialogbox_End .. _sec_L3_login2: .. rst-class:: html-toggle login2() -------- .. js:function:: login2(data, event) Function is called by :js:func:`login_dialogbox()`. The original function name was :cf:`login()`, but is renamed to :js:func:`login2()` (apparently :cf:`login` is a reserved word in Sphinx and cannot be used as a reference name). The function itself will execute an AJAX call to :py:mod:`login.min.php`. When login is successful, the user SID is stored in the `window sessionStorage property `_ with name :js:`user_sid`. (:js:`sessionStorage` object stores data for only one session, which means that the data is deleted when the browser tab is closed.) :js:`sessionStorage` info is used to determine to apply the private mode of a webpage or not. :param Object data: callback data from :ref:`VEX dialog box ` object, :param Object event: Event data from login button click (see also :numref:`table_event_properties`). :returns: Void. .. _sec_L4_login2: .. rst-class:: html-toggle Source code ^^^^^^^^^^^ .. literalinclude:: ..\..\..\js\myjs\dlgboxes_public.js :language: javascript :start-after: login2_Begin :end-before: login2_End .. _sec_L3_wachtwoord_vergeten_dialogbox: .. rst-class:: html-toggle wachtwoord_vergeten_dialogbox() ------------------------------- .. js:function:: wachtwoord_vergeten_dialogbox(event) Function is called by :js:func:`login_dialogbox()` :param Object event: :returns: .. _sec_L4_wachtwoord_vergeten_dialogbox: .. rst-class:: html-toggle Source code ^^^^^^^^^^^ .. literalinclude:: ..\..\..\js\myjs\dlgboxes_public.js :language: javascript :start-after: wachtwoord_vergeten_dialogbox_Begin :end-before: wachtwoord_vergeten_dialogbox_End .. _sec_L3_wachtwoord_vergeten: .. rst-class:: html-toggle wachtwoord_vergeten() --------------------- .. js:function:: wachtwoord_vergeten(data) Function is called by :js:func:`wachtwoord_vergeten_dialogbox()` :param Object data: callback data object, :param Object params: :returns: .. _sec_L4_wachtwoord_vergeten: .. rst-class:: html-toggle Source code ^^^^^^^^^^^ .. literalinclude:: ..\..\..\js\myjs\dlgboxes_public.js :language: javascript :start-after: wachtwoord_vergeten_Begin :end-before: wachtwoord_vergeten_End .. _sec_L2_generate_jssor_code.js: Functions in file generate_jssor_code.js ======================================== .. _sec_L3_chainedXHRequest: .. rst-class:: html-toggle chainedXHRequest() ------------------ .. js:function:: chainedXHRequest(dir,url,method,params,containerID) Function is called by :js:func:`prepareDirOverviewGallery()`, and does the actual AJAX `XMLHttpRequest `_ to the server. When the `XMLHttpRequest `_ is finished the function :js:func:`processResponse()` is called to process the retruned JSON string. :param String dir: Directory path of album with respect to document root :param String url: |prepareDirOverviewGalleryAjax.php| :param String method: 'POST' :param String params: :param String containerID: ID of **div** element :returns: Object `promise `_: .. _sec_L4_chainedXHRequest: .. rst-class:: html-toggle Source code ^^^^^^^^^^^ .. literalinclude:: ..\..\..\js\myjs\generate_jssor_code.js :language: javascript :start-after: chainedXHRequest_Begin :end-before: chainedXHRequest_End .. _sec_L3_generateDirectoryOverview: .. rst-class:: html-toggle generateDirectoryOverview() --------------------------- .. js:function:: generateDirectoryOverview(jsList,phpDef,containerID) :param JSON_Object jsList: :param Boolean phpDef: :param String containerID: :returns: .. _sec_L4_generateDirectoryOverview: .. rst-class:: html-toggle Source code ^^^^^^^^^^^ .. literalinclude:: ..\..\..\js\myjs\generate_jssor_code.js :language: javascript :start-after: generateDirectoryOverview_Begin :end-before: generateDirectoryOverview_End .. _sec_L3_prepareDirOverviewGallery: .. rst-class:: html-toggle prepareDirOverviewGallery() --------------------------- .. js:function:: prepareDirOverviewGallery(parent,dir,gpf,private_,caller,containerID) Function is alled by :js:func:`generateOverview()`. The album overview (media is structured in different directories) is generated using the `promise `_ concept by calling the function :js:func:`chainedXHRequest()`. :param String parent: For the current albums the values for parent directory are: :file:`reizen`, and :file:`dany\\reizen`. :param String dir: location directory :param String gpf: HTML or PHP filename with implementation gallery code (:phpc:`familie-gallery.php`, :phpc:`familie-gallery-private.php`, :phpc:`dany-fietsgallery.php`, :phpc:`dany-fietsgallery-private.php`). :param Boolean private: :param String caller: :param String containerID: ID tag of **div** element in which the code of the album overview is generated. :returns: .. _sec_L4_prepareDirOverviewGallery: .. rst-class:: html-toggle Source code ^^^^^^^^^^^ .. literalinclude:: ..\..\..\js\myjs\generate_jssor_code.js :language: javascript :start-after: prepareDirOverviewGallery_Begin :end-before: prepareDirOverviewGallery_End .. _sec_L3_processResponse: .. rst-class:: html-toggle processResponse() ----------------- .. js:function:: processResponse(dir,responseText,containerID) :param String dir: parent directory :param String responseText: :param String containerID: :returns: .. _sec_L4_processResponse: .. rst-class:: html-toggle Source code ^^^^^^^^^^^ .. literalinclude:: ..\..\..\js\myjs\generate_jssor_code.js :language: javascript :start-after: processResponse_Begin :end-before: processResponse_End .. _sec_L2_generate_jssor_code(2).js: Functions in file generate_jssor_code(2).js =========================================== .. _sec_L3_createGalleryContent2: .. rst-class:: html-toggle createGalleryContent2() ----------------------- .. js:function:: createGalleryContent2(private,divWrapper,uppage,queryParam) :param Boolean private: :param String divWrapper: :param String uppage: :param String queryParam: :returns: .. _sec_L4_createGalleryContent2: .. rst-class:: html-toggle Source code ^^^^^^^^^^^ .. literalinclude:: ..\..\..\js\myjs\generate_jssor_code(2).js :language: javascript :start-after: createGalleryContent2_Begin :end-before: createGalleryContent2_End .. _sec_L2_overzicht.js: Functions in file overzicht.js ============================== .. _sec_L3_generateOverview: .. rst-class:: html-toggle generateOverview() ------------------ .. js:function:: generateOverview(type,parentDir,gallery,uppage,private_modus) High level function to generate album directory overview (media of an album are distributed over different directories), and is called from :phpc:`familie-vakantie.php`, :phpc:`familie-vakantie-private.php`, :phpc:`dany-fiets.php`, and :phpc:`dany-fiets-private.php`. See also section :numref:`sec_L2_AutomaticCodeGen`, and :numref:`table24C`. The functions :js:func:`prepareDirOverviewGallery` and :js:func:`vakantie_overzicht` are called. The major album code generating actions are implemented in the function :js:func:`prepareDirOverviewGallery()`. Note: there is also a low-level function for generating album directory overview (i.e. JavaScript code which actually generates HTML code: :js:func:`generateDirectoryOverview()`. :param Enumeration type: Possible values are: **bicycle**, **holiday** :param String parentDir: parent directory. For the current albums the values for parent directory are: :file:`reizen`, and :file:`dany\\reizen`. :param String gallery: HTML or PHP filename with implementation gallery code. For the current albums the gallery files are :phpc:`dany-fietsgallery.php`, :phpc:`dany-fietsgallery-private.php`, :phpc:`familie-gallery.php`, and :phpc:`familie-gallery-private.php` :param String uppage: HTML or PHP filename (URL) to be called when back button is pressed. See also :numref:`figure_website_page_navigation`. :param Boolean private_modus: :returns: Nothing .. _sec_L4_generateOverviewCode: .. rst-class:: html-toggle Source code ^^^^^^^^^^^ .. literalinclude:: ..\..\..\js\myjs\overzicht.js :language: javascript :start-after: generateOverview_Begin :end-before: generateOverview_End .. _sec_L3_vakantie_overzicht: .. rst-class:: html-toggle vakantie_overzicht() -------------------- .. js:function:: vakantie_overzicht(gquerystr,phpGeneratedHTMLCode,uppage) Add some additional features to the album's overview container box: title of album, up page button with callack. :param gquerystr: :param Boolean phpGeneratedHTMLCode: :param uppage: :returns: Nothing .. _Fig_Function_Vakantie_overzicht: .. figure:: Fig_Function_Vakantie_overzicht.png :width: 80% Added features are indicated. .. _sec_L4_vakantie_overzicht: .. rst-class:: html-toggle Source code ^^^^^^^^^^^ .. literalinclude:: ..\..\..\js\myjs\overzicht.js :language: javascript :start-after: vakantie_overzicht_Begin :end-before: vakantie_overzicht_End .. _sec_L2_public_private.js: Functions in file public_private.js =================================== .. _public_private: .. rst-class:: html-toggle Source code ----------- .. literalinclude:: ..\..\..\js\myjs\public_private.js :language: js .. _sec_L3_AnalyseDeletedAndNewMedia: .. rst-class:: html-toggle AnalyseDeletedAndNewMedia() --------------------------- .. js:function:: AnalyseDeletedAndNewMedia(event) :param Object event: :returns: Nothing .. _sec_L4_AnalyseDeletedAndNewMediaCode: .. rst-class:: html-toggle Source code ^^^^^^^^^^^ .. literalinclude:: ..\..\..\js\myjs\public_private.js :language: javascript :start-after: AnalyseDeletedAndNewMedia_Begin :end-before: AnalyseDeletedAndNewMedia_End .. _sec_L3_delete_fotoproc_file_back2calling_page: .. rst-class:: html-toggle delete_fotoproc_file_back2calling_page() ---------------------------------------- .. js:function:: delete_fotoproc_file_back2calling_page(event) Additional callback function of :js:`StatusInfoWindow_ok_Callbacks()`. The additional callback function is an AJAX interface function to :php:`php/delete.php`. :param Object event: :returns: Nothing .. _sec_L4_delete_fotoproc_file_back2calling_page: .. rst-class:: html-toggle Source code ^^^^^^^^^^^ .. literalinclude:: ..\..\..\js\myjs\public_private.js :language: javascript :start-after: delete_fotoproc_file_back2calling_page_Begin :end-before: delete_fotoproc_file_back2calling_page_End .. _sec_L3_initSessionStorage: .. rst-class:: html-toggle initSessionStorage() -------------------- .. js:function:: initSessionStorage(menupage,sitepage) :param Integer menupage: :param Integer sitepage: :returns: Nothing .. _sec_L4_initSessionStorageCode: .. rst-class:: html-toggle Source code ^^^^^^^^^^^ .. literalinclude:: ..\..\..\js\myjs\public_private.js :language: javascript :start-after: initSessionStorage_Begin :end-before: initSessionStorage_End