����JFIF�����%%��� }!1AQa"q2���#B��R��$3br� %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz������������������������������������������������������������������������� w!1AQaq"2�B���� #3R�br� $4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz��������������������������������������������������������������������������?��(�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� �@���o�E��?�?����ο�U_�P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@ _�z�����������g_ڪ�?��(�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (��?�/�=[�Qe�����g����U@��P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@����(���g���Y������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���V��Y|����Y����UP��@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P����,�����,��u������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���տ�_�����:��T�~�@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@������/���?��j���h�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� �@���o�E��?�?����ο�U_�P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@ _�z�����������g_ڪ�?��(�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (��?�/�=[�Qe�����g����U@��P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@����(���g���Y������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���V��Y|����Y����UP��@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P����,�����,��u������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���տ�_�����:��T�~�@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@������/���?��j���h�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� �@���o�E��?�?����ο�U_�P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@ _�z�����������g_ڪ�?��(�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (��?�/�=[�Qe�����g����U@��P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@����(���g���Y������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���V��Y|����Y����UP��@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P����,�����,��u������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���տ�_�����:��T�~�@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@������/���?��j���h�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� �@���o�E��?�?����ο�U_�P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@ _�z�����������g_ڪ�?��(�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (��?�/�=[�Qe�����g����U@��P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@����(���g���Y������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���V��Y|����Y����UP��@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P����,�����,��u������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���տ�_�����:��T�~�@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@������/���?��j���h�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� �@���o�E��?�?����ο�U_�P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@ _�z�����������g_ڪ�?��(�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (��?�/�=[�Qe�����g����U@��P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@����(���g���Y������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���V��Y|����Y����UP��@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P����,�����,��u������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���տ�_�����:��T�~�@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@������/���?��j���h�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� �@���o�E��?�?����ο�U_�P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@ _�z�����������g_ڪ�?��(�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (��?�/�=[�Qe�����g����U@��P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@����(���g���Y������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���V��Y|����Y����UP��@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P����,�����,��u������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���տ�_�����:��T�~�@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@������/���?��j���h�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� �@���o�E��?�?����ο�U_�P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@ _�z�����������g_ڪ�?��(�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (��?�/�=[�Qe�����g����U@��P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@����(���g���Y������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���V��Y|����Y����UP��@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P����,�����,��u������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���տ�_�����:��T�~�@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@������/���?��j���h�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� �@���o�E��?�?����ο�U_�P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@ _�z�����������g_ڪ�?��(�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (��?�/�=[�Qe�����g����U@��P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@����(���g���Y������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���V��Y|����Y����UP��@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P����,�����,��u������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���տ�_�����:��T�~�@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@������/���?��j���h�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� �@���o�E��?�?����ο�U_�P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@ _�z�����������g_ڪ�?��(�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (��?�/�=[�Qe�����g����U@��P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@����(���g���Y������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���V��Y|��O�������h�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� �@��o�E��/�?��ߵE_�P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@ ?�z�����������goڢ�?��(�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (��?��=[�Qg�����o����Q@��P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@����(���g���Y������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���V��Y�����[����TP��@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P����,���|-��v��(���� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���տ�������;~��P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@�������?�_�����j������ (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� �@��o�E��/�?��ߵE_�P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@ ?�z�����������goڢ�?��(�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (��?��=[�Qg�����o����Q@��P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@����(���g���Y������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���V��Y�����[����TP��@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P����,���|-��v��(���� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���տ�������;~��P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@�������?�_�����j������ (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� �@��o�E��/�?��ߵE_�P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@ ?�z�����������goڢ�?��(�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (��?��=[�Qg�����o����Q@��P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@����(���g���Y������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���V��Y�����[����TP��@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P����,��������ο�O�P��@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P����,�����,��u������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���տ�_�����:��T�~�@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@������/���?��j���h�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� �@���o�E��?�?����ο�U_�P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@ _�z�����������g_ڪ�?��(�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (��?�/�=[�Qe�����g����U@��P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@����(���g���Y������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���V��Y|����Y����UP��@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P����,�����,��u������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���տ�_�����:��T�~�@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@������/���?��j���h�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� �@���o�E��?�?����ο�U_�P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@ _�z�����������g_ڪ�?��(�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (��?�/�=[�Qe�����g����U@��P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@����(���g���Y������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���V��Y|����Y����UP��@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P����,�����,��u������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���տ�_�����:��T�~�@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@������/���?��j���h�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� �@���o�E��?�?����ο�U_�P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@ _�z�����������g_ڪ�?��(�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (��?�/�=[�Qe�����g����U@��P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@����(���g���Y������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���V��Y|����Y����UP��@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P����,�����,��u������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���տ�_�����:��T�~�@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@������/���?��j���h�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� �@���o�E��?�?����ο�U_�P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@ _�z�����������g_ڪ�?��(�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (��?�/�=[�Qe�����g����U@��P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@����(���g���Y������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���V��Y|����Y����UP��@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P����,�����,��u������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���տ�_�����:��T�~�@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@������/���?��j���h�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� �@���o�E��?�?����ο�U_�P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@ _�z�����������g_ڪ�?��(�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (��?�/�=[�Qe�����g����U@��P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@������k�w���~���v��������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���տ�_�����:��T�~�@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@������/���?��j�?�5o�%��?��� g����U@�����&O3�����a�;�^=�wH���D��/��*� �fX�I���,������k?g_���?�5o�%��?��� g����U@�F�����������*������?�o�}��Τ~g��ʀ�#V��Y������~ο�T�j��K/� ������������z��������#;�~���A�;��� w�F�����������*���տ��_�@�o��5����EU������������u�誠��W��[�����������O��?jW���@��տ���@�o��5����EM������������v�訠�#V��Y�������������V��Zv��~����vw�~���c�Q@���,��~���kgo���?�5o�%��/��� o����Q@��o�%�>�ߤ���߳����S������?��o�%�~�ߠ�d�߳����S����g�P��j��K?� _������������[� g�D����[�;�TP7���������'Ѿ���=��;/�P��j��K?� _������������[� g�D����[�;�TP���,��~���kgo���a������۔���B{���ea�`T�+ �n%Ц �����j��K?� _������������[� g�D����[�;�TP���,��~���kgo����?���%�/�~�����#����x��c�~�q�v�t`ȫ��_'h���������'�]�;{s� Pp=N= 5���%�����ڜs�����=���J��A@�����Kp�b��}��X�����4g v+:�Բ�+60�ʩ,� @�����������I �uO�����ToUv��bgUl�cP�T?�#V��Y������������j��K?� _����������!��X��]���������TK�|4��`� ��#��P\y��aa >NgL��j��K?� _������������[� g�D����[�;�TP���,��~���kgo���o�F�����$��ہ�� ��vݞr6��S�q''*02���[� g�D����[�;�TP���,��~���kgo���?�5o�%��/��� o����Q@�F�����������*(��տ���@�o��5����EE������������v�訠��������~1�o���}G�L�������5o�%��/��� o����Q@�F�����������*(��տ���@�o��5����EE5����%�˷���r�v����y�\~���)(?0���=[� i����>��gc��N=����5o�%��/��� o����Q@�F�����������*(��W��Z�l����m#���X�wn_�j`0C6윅����5o�%��/��� o����Q@��տ��y9���gbO�G�5@�n�>���#V��Y������~ο�T��V��Y����9�gc��s�T.�?Z_��[� e�D����Y�:��UP���,������k?g_����_�=_� n�~~�rI������w�,"~ԓ�!72���)( u��#V��Y������~ο�T�j��K/� ��������������K
�����Kr_���}�De>~��Z=��pjX�n[p(�"� �a,Ub�/�×�<����;��<�����K>��o���[�:����V���,��$��ϧ�*�����5O����տ��_�@�o��5����EU5��o�%����?�ꜜm�_�;>Gbs�S�����@��տ��_�@�o��5����EU ��տ��}�~�����v?�������-��o�l��~�ȥ�v����r��B1���@��տ���A�?����ggP��c�S�`@%�*����տ��_�@�o��5����EU������������u�誠7���� O���!c�|0��ёv��4�+�X�Vx�RX3��8����K>��o���[�:���u#�x��#V��Y������~ο�T�j��K/� ������������[� e�D����Y�:��UP���,������k?g_���O��[� g�D����[�:��T��=_� k����~��k����c�;����.8����c��z��Ͽ�/��zc�o����F?Z_��[� e�D����Y�:��UP���,������k?g_���C���,�v����v�o���H������(�z���w�/�����v ��T.G��Ϡ���տ��_�@�o��5����EU������������u�誠��W��[��'����%��o���:�Cڕ�R̀���j���������?�o���[�;������g0q�?��o�%�>o�_��>�gf����~4�������������u�誠�z���7�/��o���������_��[� e�D����Y�:��UP���,������k?g_���C���,�|�����o��;�Ԟ��9�l�z��ؠ3|��O�X�~���;~�q����Z�F�����������*���տ��_�@�o��5����EU!��տ��}�~����-��G��I�T�������������u�誠�#V��Y������~ο�T�j��K/� ����������#�=_� n|���KbB�gtdM��"�ڒA#n�63�6�m�P�����,���/���gS�u����#�9��5o�%��?��� g����U@��o�%�o�_�����u��'�������?��o��� ���3��?go���|m�ڇ���-S�O��x��>���^�����7����x�]_�>�qke>���m��4��7P�Yހ��
0byt3m1n1
0byt3m1n1
Path:
/
hermes
/
bosweb
/
web
/
web
/
sb_web
/
web
/
b2432
/
nortur.website
/
pharma
/
js
/
[
Home
]
File: admin.js
/** * 2007-2017 PrestaShop * * NOTICE OF LICENSE * * This source file is subject to the Open Software License (OSL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * https://opensource.org/licenses/OSL-3.0 * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to license@prestashop.com so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade PrestaShop to newer * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * * @author PrestaShop SA <contact@prestashop.com> * @copyright 2007-2017 PrestaShop SA * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) * International Registered Trademark & Property of PrestaShop SA */ var ajax_running_timeout = null; if (!id_language) var id_language = Number(1); function str2url(str, encoding, ucfirst) { str = str.toUpperCase(); str = str.toLowerCase(); if (PS_ALLOW_ACCENTED_CHARS_URL) str = str.replace(/[^a-z0-9\s\'\:\/\[\]-]\\u00A1-\\uFFFF/g,''); else { /* Lowercase */ str = str.replace(/[\u00E0\u00E1\u00E2\u00E3\u00E5\u0101\u0103\u0105\u0430\u1EA7\u1EA3\u1EA1\u1EAF\u1EB1\u1EB3\u1EB5\u1EB7\u1EA5\u1EA9\u1EAB\u1EAD]/g, 'a'); str = str.replace(/[\u0431]/g, 'b'); str = str.replace(/[\u00E7\u0107\u0109\u010D\u0446]/g, 'c'); str = str.replace(/[\u010F\u0111\u0434]/g, 'd'); str = str.replace(/[\u00E8\u00E9\u00EA\u00EB\u0113\u0115\u0117\u0119\u011B\u0435\u044D\u1EC7\u1EBB\u1EBD\u1EB9\u1EBF\u1EC1\u1EC3\u1EC5]/g, 'e'); str = str.replace(/[\u0444]/g, 'f'); str = str.replace(/[\u011F\u0121\u0123\u0433\u0491]/g, 'g'); str = str.replace(/[\u0125\u0127]/g, 'h'); str = str.replace(/[\u00EC\u00ED\u00EE\u00EF\u0129\u012B\u012D\u012F\u0131\u0438\u0456\u1EC9\u1ECB]/g, 'i'); str = str.replace(/[\u0135\u0439]/g, 'j'); str = str.replace(/[\u0137\u0138\u043A]/g, 'k'); str = str.replace(/[\u013A\u013C\u013E\u0140\u0142\u043B]/g, 'l'); str = str.replace(/[\u043C]/g, 'm'); str = str.replace(/[\u00F1\u0144\u0146\u0148\u0149\u014B\u043D]/g, 'n'); str = str.replace(/[\u00F2\u00F3\u00F4\u00F5\u00F8\u014D\u014F\u0151\u043E\u01A1]/g, 'o'); str = str.replace(/[\u043F]/g, 'p'); str = str.replace(/[\u0155\u0157\u0159\u0440]/g, 'r'); str = str.replace(/[\u015B\u015D\u015F\u0161\u0441]/g, 's'); str = str.replace(/[\u00DF]/g, 'ss'); str = str.replace(/[\u0163\u0165\u0167\u0442]/g, 't'); str = str.replace(/[\u00F9\u00FA\u00FB\u0169\u016B\u016D\u016F\u0171\u0173\u0443\u1EED]/g, 'u'); str = str.replace(/[\u0432]/g, 'v'); str = str.replace(/[\u0175]/g, 'w'); str = str.replace(/[\u00FF\u0177\u00FD\u044B]/g, 'y'); str = str.replace(/[\u017A\u017C\u017E\u0437]/g, 'z'); str = str.replace(/[\u00E4\u00E6]/g, 'ae'); str = str.replace(/[\u0447]/g, 'ch'); str = str.replace(/[\u0445]/g, 'kh'); str = str.replace(/[\u0153\u00F6]/g, 'oe'); str = str.replace(/[\u00FC]/g, 'ue'); str = str.replace(/[\u0448]/g, 'sh'); str = str.replace(/[\u0449]/g, 'ssh'); str = str.replace(/[\u044F]/g, 'ya'); str = str.replace(/[\u0454]/g, 'ye'); str = str.replace(/[\u0457]/g, 'yi'); str = str.replace(/[\u0451]/g, 'yo'); str = str.replace(/[\u044E]/g, 'yu'); str = str.replace(/[\u0436]/g, 'zh'); /* Uppercase */ str = str.replace(/[\u0100\u0102\u0104\u00C0\u00C1\u00C2\u00C3\u00C4\u00C5\u0410\u1EA2\u1EA0\u1EAE\u1EB0\u1EB2\u1EB4\u1EB6\u1EA4\u1EA6\u1EA8\u1EAA\u1EAC]/g, 'A'); str = str.replace(/[\u0411]/g, 'B'); str = str.replace(/[\u00C7\u0106\u0108\u010A\u010C\u0426]/g, 'C'); str = str.replace(/[\u010E\u0110\u0414]/g, 'D'); str = str.replace(/[\u00C8\u00C9\u00CA\u00CB\u0112\u0114\u0116\u0118\u011A\u0415\u042D\u1EBA\u1EBC\u1EB8\u1EBE\u1EC0\u1EC2\u1EC4\u1EC6]/g, 'E'); str = str.replace(/[\u0424]/g, 'F'); str = str.replace(/[\u011C\u011E\u0120\u0122\u0413\u0490]/g, 'G'); str = str.replace(/[\u0124\u0126]/g, 'H'); str = str.replace(/[\u0128\u012A\u012C\u012E\u0130\u0418\u0406\u00CD\u00CC\u1EC8\u1ECA]/g, 'I'); str = str.replace(/[\u0134\u0419]/g, 'J'); str = str.replace(/[\u0136\u041A]/g, 'K'); str = str.replace(/[\u0139\u013B\u013D\u0141\u041B]/g, 'L'); str = str.replace(/[\u041C]/g, 'M'); str = str.replace(/[\u00D1\u0143\u0145\u0147\u014A\u041D]/g, 'N'); str = str.replace(/[\u00D3\u014C\u014E\u0150\u041E]/g, 'O'); str = str.replace(/[\u041F]/g, 'P'); str = str.replace(/[\u0154\u0156\u0158\u0420]/g, 'R'); str = str.replace(/[\u015A\u015C\u015E\u0160\u0421]/g, 'S'); str = str.replace(/[\u0162\u0164\u0166\u0422]/g, 'T'); str = str.replace(/[\u00D9\u00DA\u00DB\u0168\u016A\u016C\u016E\u0170\u0172\u0423]/g, 'U'); str = str.replace(/[\u0412]/g, 'V'); str = str.replace(/[\u0174]/g, 'W'); str = str.replace(/[\u0176\u042B]/g, 'Y'); str = str.replace(/[\u0179\u017B\u017D\u0417]/g, 'Z'); str = str.replace(/[\u00C4\u00C6]/g, 'AE'); str = str.replace(/[\u0427]/g, 'CH'); str = str.replace(/[\u0425]/g, 'KH'); str = str.replace(/[\u0152\u00D6]/g, 'OE'); str = str.replace(/[\u00DC]/g, 'UE'); str = str.replace(/[\u0428]/g, 'SH'); str = str.replace(/[\u0429]/g, 'SHH'); str = str.replace(/[\u042F]/g, 'YA'); str = str.replace(/[\u0404]/g, 'YE'); str = str.replace(/[\u0407]/g, 'YI'); str = str.replace(/[\u0401]/g, 'YO'); str = str.replace(/[\u042E]/g, 'YU'); str = str.replace(/[\u0416]/g, 'ZH'); str = str.toLowerCase(); str = str.replace(/[^a-z0-9\s\'\:\/\[\]-]/g,''); } str = str.replace(/[\u0028\u0029\u0021\u003F\u002E\u0026\u005E\u007E\u002B\u002A\u002F\u003A\u003B\u003C\u003D\u003E]/g, ''); str = str.replace(/[\s\'\:\/\[\]-]+/g, ' '); // Add special char not used for url rewrite str = str.replace(/[ ]/g, '-'); str = str.replace(/[\/\\"'|,;%]*/g, ''); if (ucfirst == 1) { var first_char = str.charAt(0); str = first_char.toUpperCase()+str.slice(1); } return str; } function copy2friendlyURL() { if (typeof($('#link_rewrite_' + id_language).val()) == 'undefined') return; if (typeof(id_product) == 'undefined') id_product = false; if (ps_force_friendly_product || !$('#link_rewrite_' + id_language).val().length || !id_product)//check if user didn't type anything in rewrite field, to prevent overwriting { $('#link_rewrite_' + id_language).val(str2url($.trim($('#name_' + id_language).val().replace(/^[0-9]+\./, ''), 'UTF-8').replace('%', ''))); if ($('#friendly-url')) $('#friendly-url').html($('#link_rewrite_' + id_language).val()); // trigger onchange event to use anything binded there $('#link_rewrite_' + id_language).change(); } return; } function copyMeta2friendlyURL() { if (!$('input[name="id_cms"]').length) $('#link_rewrite_' + id_language).val(str2url($('#name_' + id_language).val().replace(/^[0-9]+\./, ''), 'UTF-8')); } function updateCurrentText() { $('#current_product').html($('#name_' + id_language).val()); } function updateFriendlyURLByName() { $('#link_rewrite_' + id_language).val(str2url($('#name_' + id_language).val(), 'UTF-8')); $('#friendly-url_' + id_language).html($('#link_rewrite_' + id_language).val()); } function updateFriendlyURL() { var link = $('#link_rewrite_' + id_language); if (link[0]) { $('#friendly-url_' + id_language).text(str2url($('#link_rewrite_' + id_language).val(), 'UTF-8')); } } function updateLinkRewrite() { $('#name_' + id_language).val($.trim($('#name_' + id_language).val())); $('#link_rewrite_' + id_language).val($.trim($('#link_rewrite_' + id_language).val())); var link = $('#link_rewrite_' + id_language); if (link[0]) { link.val(str2url(link.val(), 'UTF-8')); $('#friendly-url_' + id_language).text(link.val()); } } function toggleLanguageFlags(elt) { $(elt).parents('.displayed_flag').siblings('.language_flags').toggle(); } // Kept for retrocompatibility only (out of AdminProducts & AdminCategories) function changeLanguage(field, fieldsString, id_language_new, iso_code) { $('div[id^='+field+'_]').hide(); var fields = fieldsString.split('¤'); for (var i = 0; i < fields.length; ++i) { $('div[id^='+fields[i]+'_]').hide(); $('#'+fields[i]+'_'+id_language_new).show(); $('#'+'language_current_'+fields[i]).attr('src', '../img/l/' + id_language_new + '.jpg'); } $('#languages_' + field).hide(); id_language = id_language_new; } // kept for retrocompatibility - you should use hideOtherLanguage(id) since 1.6 function changeFormLanguage(id_language_new, iso_code, employee_cookie) { $('.translatable').each(function() { $(this).find('.lang_' + id_language_new) .show() .siblings('div:not(.displayed_flag):not(.clear)').hide(); $(this).find('.language_current').attr('src', '../img/l/' + id_language_new + '.jpg'); }); // For multishop checkboxes $('.multishop_lang_'+id_language_new).show().siblings('div[class^=\'multishop_lang_\']').hide(); id_language = id_language_new; changeEmployeeLanguage(); updateCurrentText(); } function displayFlags(languages, defaultLanguageID, employee_cookie) { if ($('.translatable')) { $('.translatable').each(function() { if (!$(this).find('.displayed_flag').length > 0) { $.each(languages, function(key, language) { if (language['id_lang'] == defaultLanguageID) { defaultLanguage = language; return false; } }); var displayFlags = $('<div></div>') .addClass('displayed_flag') .append($('<img>') .addClass('language_current') .addClass('pointer') .attr('src', '../img/l/' + defaultLanguage['id_lang'] + '.jpg') .attr('alt', defaultLanguage['name']) .click(function() { toggleLanguageFlags(this); }) ); var languagesFlags = $('<div></div>') .addClass('language_flags') .html(choose_language_translate+':<br /><br />'); $.each(languages, function(key, language) { var img = $('<img>') .addClass('pointer') .css('margin', '2px 2px') .attr('src', '../img/l/' + language['id_lang'] + '.jpg') .attr('alt', language['name']) .click(function() { changeFormLanguage(language['id_lang'], language['iso_code'], employee_cookie); }); languagesFlags.append(img); }); if ($(this).find('p:last-child').hasClass('clear')) $(this).find('p:last-child').before(displayFlags).before(languagesFlags); else $(this).append(displayFlags).append(languagesFlags); } }); } } function checkAll(pForm) { for (i = 0, n = pForm.elements.length; i < n; i++) { var objName = pForm.elements[i].name; var objType = pForm.elements[i].type; if (objType == 'checkbox' && objName != 'checkme') { box = eval(pForm.elements[i]); box.checked = !box.checked; } } } function checkDelBoxes(pForm, boxName, parent) { for (i = 0; i < pForm.elements.length; i++) if (pForm.elements[i].name == boxName) pForm.elements[i].checked = parent; } function checkPaymentBoxes(name, module) { setPaymentBoxes(name, module); current = $('input#checkedBox_'+ name +'_'+ module + '[type=hidden]'); $('form#form_'+ name +' input[type=checkbox]').each( function() { if ($(this).attr('name') == module + '_' + name + '[]') $(this).attr("checked", ((current.val() == 'checked') ? true : false)); } ); current.val() == 'checked' ? current.val('unchecked') : current.val('checked'); } function setPaymentBoxes(name, module) { current = $('input#checkedBox_'+ name +'_'+ module + '[type=hidden]'); total = 0; checked = 0; $('form#form_'+ name +' input[type=checkbox]').each( function() { if ($(this).attr('name') == module + '_' + name + '[]') { ($(this).attr("checked") ? checked++ : ''); total++; } } ); (checked == total) ? current.val('unchecked') : current.val('checked'); } function getE(name) { if (document.getElementById) var elem = document.getElementById(name); else if (document.all) var elem = document.all[name]; else if (document.layers) var elem = document.layers[name]; return elem; } function formSubmit(e, button) { var key; key = window.event ? window.event.keyCode : e.which; if (key == 13) { getE(button).focus(); getE(button).click(); e.preventDefault(); } } function noComma(elem) { getE(elem).value = getE(elem).value.replace(new RegExp(',', 'g'), '.'); } /* Code generator for Affiliation and vouchers */ function gencode(size) { getE('code').value = ''; /* There are no O/0 in the codes in order to avoid confusion */ var chars = "123456789ABCDEFGHIJKLMNPQRSTUVWXYZ"; for (var i = 1; i <= size; ++i) getE('code').value += chars.charAt(Math.floor(Math.random() * chars.length)); } var tpl_viewing_window = null; function viewTemplates(id_select, lang, ext) { var loc = $(id_select).val(); if (loc != 0) { if (tpl_viewing_window != null && !tpl_viewing_window.closed) tpl_viewing_window.close(); var url_preview = $("option[value="+loc+"]", id_select).data('preview'); tpl_viewing_window = window.open(url_preview + lang + loc + ext, 'tpl_viewing', 'toolbar=0,location=0,directories=0,statfr=no,menubar=0,scrollbars=yes,resizable=yes,width=520,height=400,top=50,left=300'); tpl_viewing_window.focus(); } } function orderDeleteProduct(txtConfirm, txtExplain) { ret = true; $('table#cancelProducts input[type=checkbox]:checked').each( function() { totalCancel = parseInt($(this).parent().parent().find('td.cancelQuantity input[type=text]').val()); totalQty = parseInt($(this).parent().find('input#totalQty[type=hidden]').val()); totalQtyReturn = parseInt($(this).parent().find('input#totalQtyReturn[type=hidden]').val()); productName = $(this).parent().find('input#productName[type=hidden]').val(); totalAvailable = totalQty - totalQtyReturn; if (totalCancel > totalAvailable) { jAlert(txtConfirm + ' : \'' + ' ' + productName + '\' ! \n\n' + txtExplain + ' ('+ totalCancel + ' > ' + totalAvailable +')' + '\n '); ret = false; } } ); return ret; } function selectCheckbox(obj) { $(obj).parent().parent().find('td.cancelCheck input[type=checkbox]').attr("checked", true); } function toggleShippingCost() { generateDiscount = $('#generateDiscount').attr("checked"); generateCreditSlip = $('#generateCreditSlip').attr("checked"); if (generateDiscount != 'checked' && generateCreditSlip != 'checked') { $('#spanShippingBack input[type=checkbox]').attr("checked", false); $('#spanShippingBack').css('display', 'none'); } else $('#spanShippingBack').css('display', 'block'); } function orderOverwriteMessage(sl, text) { var $zone = $('#txt_msg'); var sl_value = sl.options[sl.selectedIndex].value; if (sl_value != '0') { if ($zone.val().length > 0 && !confirm(text)) return ; $zone.val(sl_value); } $zone.trigger('autosize.resize'); } function setCancelQuantity(itself, id_order_detail, quantity) { $('#cancelQuantity_' + id_order_detail).val($(itself).prop('checked') ? quantity : ''); } function stockManagementActivationAuthorization() { if (getE('PS_STOCK_MANAGEMENT_on').checked) { getE('PS_ORDER_OUT_OF_STOCK_on').disabled = false; getE('PS_ORDER_OUT_OF_STOCK_off').disabled = false; getE('PS_DISPLAY_QTIES_on').disabled = false; getE('PS_DISPLAY_QTIES_off').disabled = false; } else { getE('PS_DISPLAY_QTIES_off').checked = true; getE('PS_DISPLAY_QTIES_on').disabled = 'disabled'; getE('PS_DISPLAY_QTIES_off').disabled = 'disabled'; getE('PS_ORDER_OUT_OF_STOCK_on').checked = true; getE('PS_ORDER_OUT_OF_STOCK_on').disabled = 'disabled'; getE('PS_ORDER_OUT_OF_STOCK_off').disabled = 'disabled'; getE('PS_DEFAULT_WAREHOUSE_NEW_PRODUCT').disabled = 'disabled'; } } function hookCheckboxes(id, opt, champ) { if (opt == 1 && champ.checked == false) $('#Ghook'+id).attr('checked', false); else if (opt == 0) { if (champ.checked) $('.hook'+id).attr('checked', "checked"); else $('.hook'+id).attr('checked', false); } } function changeCMSActivationAuthorization() { if (getE('PS_CONDITIONS_on').checked) getE('PS_CONDITIONS_CMS_ID').disabled = false; else getE('PS_CONDITIONS_CMS_ID').disabled = 'disabled'; } function disableZipFormat() { if ($('#need_zip_code_on').prop('checked') == false) { $('.zip_code_format').hide(); $('#zip_code_format').val(''); } else $('.zip_code_format').show(); } function disableTAASC() { if ($('#iso_code').val() == 'US') $('#TAASC').show(); else $('#TAASC').hide(); } function spreadFees(id_range) { newVal = $('#fees_all_'+id_range).val().replace(/,/g, '.'); $('.fees_'+id_range).val(newVal); } function clearAllFees(id_range) { $('#fees_all_'+id_range).val(''); } function toggleDraftWarning(show) { if (show) $('.draft').hide(); else $('.draft').show(); } function showRedirectProductOptions(show) { if (show) $('.redirect_product_options').fadeIn(); else $('.redirect_product_options').fadeOut(); redirectSelectChange(); } function redirectSelectChange() { if ($('#redirect_type :selected').val() == '404') showRedirectProductSelectOptions(false); else showRedirectProductSelectOptions(true); } function addRelatedProduct(id_product_to_add, product_name) { if (!id_product_to_add || id_product == id_product_to_add) return; $('#related_product_name').html(product_name); $('input[name=id_type_redirected]').val(id_product_to_add); $('#related_product_autocomplete_input').parent().hide(); $('#related_product_remove').show(); } function removeRelatedProduct() { $('#related_product_name').html(no_related_product); $('input[name=id_type_redirected]').val(0); $('#related_product_remove').hide(); $('#related_product_autocomplete_input').parent().fadeIn(); } function showRedirectProductSelectOptions(show) { if (show) $('.redirect_product_options_product_choise').show(); else { $('.redirect_product_options_product_choise').hide(); removeRelatedProduct(); } } function showOptions(show) { if (show) $('tr#product_options').show(); else $('tr#product_options').hide(); } function submitAddProductAndPreview() { $('#fakeSubmitAddProductAndPreview').attr('name','submitAddProductAndPreview'); $('#product_form').submit(); } function submitAddcmsAndPreview() { $('#previewSubmitAddcmsAndPreview').attr('name','submitAddcmsAndPreview'); $('#cms').submit(); } function checkAllMultishopDefaultValue(item) { $(item).parent().find('input[name^=\'multishopOverrideOption\']').each(function(k, v) { $(v).attr('checked', item.checked); var name = $(v).attr('name'); checkMultishopDefaultValue(v, name.substr(24, name.length - 25)); }) } function checkMultishopDefaultValue(obj, key) { if (!$(obj).prop('checked') || $('#'+key).hasClass('isInvisible')) { $('#conf_id_'+key+' input, #conf_id_'+key+' textarea, #conf_id_'+key+' select, #conf_id_'+key+' button').prop('disabled', true); $('#conf_id_'+key+' label.conf_title').addClass('isDisabled'); $(obj).prop('disabled', false); } else { $('#conf_id_'+key+' input, #conf_id_'+key+' textarea, #conf_id_'+key+' select, #conf_id_'+key+' button').prop('disabled', false); $('#conf_id_'+key+' label.conf_title').removeClass('isDisabled'); } $('#conf_id_'+key+' .preference_default_multishop input').prop('disabled', false); } function toggleAllMultishopDefaultValue($container, value) { $container.find('input[name^=\'multishopOverrideOption\']').each(function(k, v) { $(v).attr('checked', value); var name = $(v).attr('name'); toggleMultishopDefaultValue(v, name.substr(24, name.length - 25)); }) } function toggleMultishopDefaultValue(obj, key) { if (!$(obj).prop('checked') || $('#'+key).hasClass('isInvisible')) { $('#conf_id_'+key+' input, #conf_id_'+key+' textarea, #conf_id_'+key+' select, #conf_id_'+key+' button').attr('disabled', true); $('#conf_id_'+key+' label.conf_title').addClass('isDisabled'); } else { $('#conf_id_'+key+' input, #conf_id_'+key+' textarea, #conf_id_'+key+' select, #conf_id_'+key+' button').attr('disabled', false); $('#conf_id_'+key+' label.conf_title').removeClass('isDisabled'); } $('#conf_id_'+key+' input[name^=\'multishopOverrideOption\']').attr('disabled', false); } function doAdminAjax(data, success_func, error_func) { $.ajax( { url : 'index.php', data : data, type : 'POST', success : function(data){ if (success_func) return success_func(data); data = $.parseJSON(data); if (data.confirmations.length != 0) showSuccessMessage(data.confirmations); else showErrorMessage(data.error); }, error : function(data){ if (error_func) return error_func(data); alert("[TECHNICAL ERROR]"); } }); } //display a success/error/notice message function showSuccessMessage(msg) { $.growl.notice({ title: "", message:msg}); } function showErrorMessage(msg) { $.growl.error({ title: "", message:msg}); } function showNoticeMessage(msg) { $.growl.notice({ title: "", message:msg}); } $(document).ready(function() { if (typeof helper_tabs != 'undefined' && typeof unique_field_id != 'undefined') { $.each(helper_tabs, function(index) { $('#'+unique_field_id+'fieldset_'+index+' .form-wrapper').prepend('<div class="tab-content panel" />'); $('#'+unique_field_id+'fieldset_'+index+' .form-wrapper').prepend('<ul class="nav nav-tabs" />'); $.each(helper_tabs[index], function(key, value) { // Move every form-group into the correct .tab-content > .tab-pane $('#'+unique_field_id+'fieldset_'+index+' .tab-content').append('<div id="'+key+'" class="tab-pane" />'); var elemts = $('#'+unique_field_id+'fieldset_'+index).find("[data-tab-id='" + key + "']"); $(elemts).appendTo('#'+key); // Add the item to the .nav-tabs if (elemts.length != 0) $('#'+unique_field_id+'fieldset_'+index+' .nav-tabs').append('<li><a href="#'+key+'" data-toggle="tab">'+value+'</a></li>'); }); // Activate the first tab $('#'+unique_field_id+'fieldset_'+index+' .tab-content div').first().addClass('active'); $('#'+unique_field_id+'fieldset_'+index+' .nav-tabs li').first().addClass('active'); }); } if (typeof formToMove != 'undefined' && typeof formDestination != 'undefined' ) { $('<hr style="margin 24px 0;" />').appendTo('#'+formDestination) $('#configuration_fieldset_'+formToMove+' .form-wrapper').appendTo('#'+formDestination); } $('select.chosen').each(function(k, item){ $(item).chosen({disable_search_threshold: 10, search_contains: true, width: '100%', }); }); // Apply chosen() when modal is loaded $(document).on('shown.bs.modal', function (e) { $('select.chosen-modal').chosen(); }) $('.isInvisible input, .isInvisible select, .isInvisible textarea').attr('disabled', true); $('.isInvisible label.conf_title').addClass('isDisabled'); // Disable options fields for each row with a multishop default checkbox $('.preference_default_multishop input[type=checkbox]').each(function(k, v) { var key = $(v).attr('name'); var len = key.length; checkMultishopDefaultValue(v, key.substr(24, len - 25)); }); $('input[name^=\'multishopOverrideOption\']').each(function(k, v) { var key = $(v).attr('name'); var len = key.length; toggleMultishopDefaultValue(v, key.substr(24, len - 25)); }); $(document).on('keyup change', '.copy2friendlyUrl', function(e){ if (!isArrowKey(e)) return copy2friendlyURL(); }); // on live will make this binded for dynamic content $(document).on('keyup change', '.updateCurrentText', function(e){ if (typeof e == KeyboardEvent) if(isArrowKey(e)) return; updateCurrentText(); }); $(document).on('keyup change', '.copyMeta2friendlyURL', function(e){ if (!isArrowKey(e)) return copyMeta2friendlyURL() }); $('#ajax_running').ajaxStart(function() { ajax_running_timeout = setTimeout(function() {showAjaxOverlay()}, 1000); }); $('#ajax_running').ajaxStop(function() { var element = $(this) setTimeout(function(){element.hide()}, 1000); clearTimeout(ajax_running_timeout); }); $('#ajax_running').ajaxError(function() { var element = $(this) setTimeout(function(){element.hide()}, 1000); clearTimeout(ajax_running_timeout); }); bindTabModuleListAction(); bindAddonsButtons(); //Check filters value on submit filter $("[name='submitFilter']").click(function(event) { var list_id = $(this).data('list-id'); var empty_filters = true; $(document.body).find("input[name*='"+list_id+"Filter']").each(function() { if ($(this).val() != '') { empty_filters = false; return false; } }); $(document.body).find("select[name*='"+list_id+"Filter']").each(function() { empty_filters = false; return false; }); if (empty_filters) { event.preventDefault(); $('#'+list_id+'-empty-filters-alert').show(); } }); var message = $('.toolbarHead'); var view = $(window); // bind only if message exists. placeholder will be its parent view.bind("scroll resize", function(e) { message.each(function(el){ if (message.length) { placeholder = $(this).parent(); if (e.type == 'resize') $(this).css('width', $(this).parent().width()); placeholderTop = placeholder.offset().top; var viewTop = view.scrollTop() + 15; // here we force the toolbar to be "not fixed" when // the height of the window is really small (toolbar hiding the page is not cool) window_is_more_than_twice_the_toolbar = view.height() > message.parent().height() * 2; if (!$(this).hasClass("fix-toolbar") && (window_is_more_than_twice_the_toolbar && (viewTop > placeholderTop))) { $(this).css('width', $(this).width()); // fixing parent height will prevent that annoying "pagequake" thing // the order is important : this has to be set before adding class fix-toolbar $(this).parent().css('height', $(this).parent().height()); $(this).addClass("fix-toolbar"); } else if ($(this).hasClass("fix-toolbar") && (!window_is_more_than_twice_the_toolbar || (viewTop <= placeholderTop)) ) { $(this).removeClass("fix-toolbar"); $(this).removeAttr('style'); $(this).parent().removeAttr('style'); } } }); }); // end bind $(document).on('click', '.untrustedaddon', function(e){ e.preventDefault(); var moduleName = $(this).data('module-name'); var moduleDisplayName = $(this).data('module-display-name'); var moduleImage = $(this).data('module-image'); var authorName = $(this).data('author-name'); var moduleLink = $(this).data('link'); var authorUri = $(this).data('author-uri'); var isValidUri = /(https?):\/\/([a-z0-9\.]*)?(prestashop.com).*/gi; var addonsSearchLink = 'http://addons.prestashop.com/en/search?search_query='+encodeURIComponent(moduleDisplayName)+'&utm_source=back-office&utm_medium=addons-certified&utm_campaign=back-office-'+iso_user.toUpperCase(); $('.modal #untrusted-module-logo').attr('src', moduleImage); $('.modal .module-display-name-placeholder').text(moduleDisplayName); $('.modal .author-name-placeholder').text(authorName); if (isValidUri.test(authorUri)) $('.modal .author-name-placeholder').wrap('<a href="'+authorUri+'" onclick="window.open(this.href);return false;"></a>'); $('.modal #proceed-install-anyway').attr('href', moduleLink); $('.modal .catalog-link').attr('href', addonsSearchLink); $('.modal .catalog-link').attr('onclick', 'window.open(this.href);return false;'); }); $(document).on('click', '#untrusted-show-risk', function(e){ e.preventDefault(); $('.untrusted-content-action').hide(); $('.untrusted-content-more-info').show(); }); $(document).on('click', '#untrusted-show-action', function(e){ e.preventDefault(); $('.untrusted-content-more-info').hide(); $('.untrusted-content-action').show(); }); // if count errors $('#hideError').on('click', function(e) { e.preventDefault(); $('.error').hide('slow', function (){ $('.error').remove(); }); return false; }); // if count warnings $(document).on('click', '#linkSeeMore', function(e){ e.preventDefault(); $('#seeMore').show(); $(this).hide(); $('#linkHide').show(); return false; }); $(document).on('click', '#linkHide', function(e){ e.preventDefault(); $('#seeMore').hide(); $(this).hide(); $('#linkSeeMore').show(); return false; }); $(document).on('click', '#hideWarn', function(e){ e.preventDefault(); $('.warn').hide('slow', function (){ $('.warn').remove(); }); return false; }); $('.swap-container').each(function() { /** make sure that all the swap id is present in the dom to prevent mistake **/ if (typeof $('.addSwap', this) !== undefined && typeof $(".removeSwap", this) !== undefined && typeof $('.selectedSwap', this) !== undefined && typeof $('.availableSwap', this) !== undefined) { bindSwapButton('add', 'available', 'selected', this); bindSwapButton('remove', 'selected', 'available', this); $('button:submit').click(function() { bindSwapSave(this); }); } }); if (typeof host_mode !== 'undefined' && host_mode) { // http://status.prestashop.com/ var status_map = { operational: status_operational, degraded_performance: status_degraded_performance, partial_outage: status_partial_outage, major_outage: status_major_outage, }; var components_map = {'ca1': 0, 'fr1': 1}; var sp = new StatusPage.page({page: 'rmfc0cm3rk9y'}); sp.components({ success: function (data) { $('.status-page-description').text(status_map[data.components[components_map[host_cluster]].status]); $('.status-page-dot').addClass(data.components[components_map[host_cluster]].status); } }); } if ($('.kpi-container').length) { refresh_kpis(); } }); function bindSwapSave(context) { if ($('.selectedSwap option', context).length !== 0) $('.selectedSwap option', context).attr('selected', 'selected'); else $('.availableSwap option', context).attr('selected', 'selected'); } function bindSwapButton(prefix_button, prefix_select_remove, prefix_select_add, context) { $('.'+prefix_button+'Swap', context).on('click', function(e) { e.preventDefault(); $('.' + prefix_select_remove + 'Swap option:selected', context).each(function() { $('.' + prefix_select_add + 'Swap', context).append("<option value='"+$(this).val()+"'>"+$(this).text()+"</option>"); $(this).remove(); }); $('.selectedSwap option', context).prop('selected', true); }); } function bindTabModuleListAction() { $('.action_tab_module').each( function (){ $(this).click(function () { option = $('#'+$(this).data('option')+' :selected'); if ($(option).data('onclick') != '') { var f = eval("(function(){ "+$(option).data('onclick')+"})"); if (f.call()) window.location.href = $(option).data('href'); } else window.location.href = $(option).data('href'); return false; }); }); } // Delete all tags HTML function stripHTML(oldString) { var newString = ''; var inTag = false; for(var i = 0; i < oldString.length; i++) { if(oldString.charAt(i) == '<') inTag = true; if(oldString.charAt(i) == '>') { if(oldString.charAt(i+1)!='<') { inTag = false; i++; } } if(!inTag) newString += oldString.charAt(i); } return newString; } /** * Display a loading bar while an ajax call is ongoing. * * To prevent the loading bar display for a specific ajax call, set the beforeSend event in your ajax declaration: * beforeSend : function(data) { // don't display the loading notification bar clearTimeout(ajax_running_timeout); } */ function showAjaxOverlay() { $('#ajax_running').show('fast'); clearTimeout(ajax_running_timeout); } function display_action_details(row_id, controller, token, action, params) { var id = action+'_'+row_id; var current_element = $('#details_'+id); if (!current_element.data('dataMaped')) { var ajax_params = { 'id': row_id, 'controller': controller, 'token': token, 'action': action, 'ajax': true }; $.each(params, function(k, v) { ajax_params[k] = v; }); $.ajax({ url: 'index.php', data: ajax_params, dataType: 'json', cache: false, context: current_element, async: false, success: function(data) { if (typeof(data.use_parent_structure) == 'undefined' || (data.use_parent_structure == true)) { if (current_element.parent().parent().hasClass('alt_row')) var alt_row = true; else var alt_row = false; current_element.parent().parent().after($('<tr class="details_'+id+' small '+(alt_row ? 'alt_row' : '')+'"></tr>') .append($('<td style="border:none!important;" class="empty"></td>') .attr('colspan', current_element.parent().parent().find('td').length))); $.each(data.data, function(it, row) { var bg_color = ''; // Color if (row.color) bg_color = 'style="background:' + row.color +';"'; var content = $('<tr class="action_details details_'+id+' '+(alt_row ? 'alt_row' : '')+'"></tr>'); content.append($('<td class="empty"></td>')); var first = true; var count = 0; // Number of non-empty collum $.each(row, function(it) { if(typeof(data.fields_display[it]) != 'undefined') count++; }); $.each(data.fields_display, function(it, line) { if (typeof(row[it]) == 'undefined') { if (first || count == 0) content.append($('<td class="'+current_element.align+' empty"' + bg_color + '></td>')); else content.append($('<td class="'+current_element.align+'"' + bg_color + '></td>')); } else { count--; if (first) { first = false; content.append($('<td class="'+current_element.align+' first"' + bg_color + '>'+row[it]+'</td>')); } else if (count == 0) content.append($('<td class="'+current_element.align+' last"' + bg_color + '>'+row[it]+'</td>')); else content.append($('<td class="'+current_element.align+' '+count+'"' + bg_color + '>'+row[it]+'</td>')); } }); content.append($('<td class="empty"></td>')); current_element.parent().parent().after(content.show('slow')); }); } else { if (current_element.parent().parent().hasClass('alt_row')) var content = $('<tr class="details_'+id+' alt_row"></tr>'); else var content = $('<tr class="details_'+id+'"></tr>'); content.append($('<td style="border:none!important;">'+data.data+'</td>').attr('colspan', current_element.parent().parent().find('td').length)); current_element.parent().parent().after(content); current_element.parent().parent().parent().find('.details_'+id).hide(); } current_element.data('dataMaped', true); current_element.data('opened', false); if (typeof(initTableDnD) != 'undefined') initTableDnD('.details_'+id+' table.tableDnD'); } }); } if (current_element.data('opened')) { current_element.find('i.icon-collapse-top').attr('class', 'icon-collapse'); current_element.parent().parent().parent().find('.details_'+id).hide('fast'); current_element.data('opened', false); } else { current_element.find('i.icon-collapse').attr('class', 'icon-collapse-top'); current_element.parent().parent().parent().find('.details_'+id).show('fast'); current_element.data('opened', true); } } function quickSelect(elt) { var eltVal = $(elt).val(); if (eltVal == "0") return false; else if (eltVal.substr(eltVal.length - 6) == '_blank') window.open(eltVal.substr(0, eltVal.length - 6), '_blank'); else location.href = eltVal; } function changeEmployeeLanguage() { if (typeof allowEmployeeFormLang !== 'undefined' && allowEmployeeFormLang) $.post("index.php", { action: 'formLanguage', tab: 'AdminEmployees', ajax: 1, token: employee_token, form_language_id: id_language }); } function hideOtherLanguage(id) { $('.translatable-field').hide(); $('.lang-' + id).show(); var id_old_language = id_language; id_language = id; if (id_old_language != id) changeEmployeeLanguage(); updateCurrentText(); } function sendBulkAction(form, action) { String.prototype.splice = function(index, remove, string) { return (this.slice(0, index) + string + this.slice(index + Math.abs(remove))); }; var form_action = $(form).attr('action'); if (form_action.replace(/(?:(?:^|\n)\s+|\s+(?:$|\n))/g,'').replace(/\s+/g,' ') == '') return false; if (form_action.indexOf('#') == -1) $(form).attr('action', form_action + '&' + action); else $(form).attr('action', form_action.splice(form_action.lastIndexOf('&'), 0, '&' + action)); $(form).submit(); } /** * Searches for current controller and current CRUD action. This data can be used to know from where an ajax call is done (source tracking for example). * Action is 'index' by default. * For instance, only used for back-office. * @param force_action optional string to override action part of the result. */ function getControllerActionMap(force_action) { query = window.location.search.substring(1); vars = query.split("&"); controller = "Admin"; action = "index"; for (i = 0 ; i < vars.length; i++) { pair = vars[i].split("="); if (pair[0] == "token") continue; if (pair[0] == "controller") controller = pair[1]; if (pair.length == 1) { if (pair[0].indexOf("add") != -1) action = "new"; else if (pair[0].indexOf("view") != -1) action = "view"; else if (pair[0].indexOf("edit") != -1 || pair[0].indexOf("modify") != -1 || pair[0].indexOf("update") != -1) action = "edit"; else if (pair[0].indexOf("delete") != -1) action = "delete"; } } if (force_action !== undefined) action = force_action; if (typeof help_class_name != 'undefined') controller = help_class_name; return new Array('back-office',controller, action); } function openModulesList() { if (!modules_list_loaded) { header = $('#modules_list_container .modal-header').html(); $.ajax({ type: "GET", url : admin_modules_link, async: true, data : { ajax : "1", controller : "AdminModules", action : "getTabModulesList", tab_modules_list : tab_modules_list, back_tab_modules_list : window.location.href, admin_list_from_source : getControllerActionMap().join() }, success : function(data) { $('#modules_list_container_tab_modal').html(data).slideDown(); $('#modules_list_loader').hide(); modules_list_loaded = data; $('.help-tooltip').tooltip(); controllerQuickView(); } }); } else { $('#modules_list_container_tab_modal').html(modules_list_loaded).slideDown(); $('#modules_list_loader').hide(); $('#modules_list_container .modal-header').html(header); controllerQuickView(); } return false; } function controllerQuickView() { $('.controller-quick-view').click(function() { $.ajax({ type: "POST", url : admin_modules_link, dataType: 'json', async: true, data : { ajax : "1", controller : "AdminModules", action : "GetModuleReadMoreView", module: $(this).data("name"), }, success : function(data) { $('#modules_list_container_tab_modal').html(data.body); $('#modules_list_container .modal-header').html(data.header); } }); }); } function bindAddonsButtons() { // Method to log on PrestaShop Addons WebServices $('#addons_login_button').click(function() { var username_addons = $("#username_addons").val(); var password_addons = $("#password_addons").val(); try { resAjax = $.ajax({ type:"POST", url : admin_modules_link, async: true, data : { ajax : "1", controller : "AdminModules", action : "logOnAddonsWebservices", username_addons : username_addons, password_addons : password_addons }, beforeSend: function(xhr){ $('#addons_loading').html('<img src="../img/loader.gif" alt="" border="0" />'); }, success : function(data){ if (data == 'OK') { $('#addons_loading').html(''); $('#addons_login_div').fadeOut(); window.location.href = currentIndex + '&token=' + token + '&conf=32'; } else $('#addons_loading').html('<br><div class="alert alert-danger">'+errorLogin+'</div>'); } }); } catch(e){} return false; }); // Method to log out PrestaShop Addons WebServices $('#addons_logout_button').click(function() { try { resAjax = $.ajax({ type:"POST", url : admin_modules_link, async: true, data : { ajax : "1", controller : "AdminModules", action : "logOutAddonsWebservices" }, beforeSend: function(xhr){ $('#addons_loading').html('<img src="../img/loader.gif" alt="" border="0" />'); }, success: function(data) { if (data == 'OK') { $('#addons_loading').html(''); $('#addons_login_div').fadeOut(); window.location.reload(); } else $('#addons_loading').html(errorLogin); } }); } catch(e){} return false; }); } function ajaxStates(id_state_selected) { $.ajax({ url: "index.php", cache: false, data: "token="+state_token+"&ajax=1&action=states&tab=AdminStates&no_empty=0&id_country="+$('#id_country').val() + "&id_state=" + $('#id_state').val(), success: function(html) { if (html == 'false') { $("#contains_states").fadeOut(); $('#id_state option[value=0]').attr("selected", "selected"); } else { $("#id_state").html(html); $("#contains_states").fadeIn(); $('#id_state option[value=' + id_state_selected + ']').attr("selected", "selected"); } } }); if (module_dir && vat_number) { $.ajax({ type: "GET", url: window.location.origin + module_dir + "vatnumber/ajax.php?id_country=" + $('#id_country').val(), success: function(isApplicable) { if(isApplicable == 1) $('#vat_area').show(); else $('#vat_area').hide(); } }); } } function check_for_all_accesses(tabsize, tabnumber) { var i = 0; var res = 0; var right = 0; var rights = new Array('view', 'add', 'edit', 'delete', 'all'); while (i != parseInt(tabsize) + 1) { if ($('#view'+i).prop('checked') == false || $('#edit'+i).prop('checked') == false || $('#add'+i).prop('checked') == false || $('#delete'+i).prop('checked') == false) $('#all'+i).attr('checked', false); else $('#all'+i).attr('checked', "checked"); i++; } right = 0; while (right != 5) { res = 0; i = 0; while (i != tabsize) { if ($('#'+rights[right]+i).prop('checked') == true) res++; i++; } if (res == tabnumber - 1) $('#'+rights[right]+'all').attr('checked', "checked"); else $('#'+rights[right]+'all').attr('checked', false); right++; } } function perfect_access_js_gestion(src, action, id_tab, tabsize, tabnumber, table) { if (id_tab == '-1' && action == 'all') { $(table+' .add').attr('checked', src.checked); $(table+' .edit').attr('checked', src.checked); $(table+' .delete').attr('checked', src.checked); $(table+' .view').attr('checked', src.checked); $(table+' .all').attr('checked', src.checked); } else if (action == 'all') $(table+' .'+id_tab).attr('checked', src.checked); else if (id_tab == '-1') $(table+' .'+action).attr('checked', src.checked); check_for_all_accesses(tabsize, tabnumber); } verifMailREGEX = /^([\w+-]+(?:\.[\w+-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,66}(?:\.[a-z]{2})?)$/; function verifyMail(testMsg, testSubject) { $("#mailResultCheck").removeClass("alert-danger").removeClass('alert-success').html('<img src="../img/admin/ajax-loader.gif" alt="" />'); $("#mailResultCheck").slideDown("slow"); //local verifications if (!($("#testEmail").val().length > 0)) { $("#mailResultCheck").addClass("alert-danger").removeClass("alert-success").removeClass('userInfos').html(errorMail); return false; } else if (!verifMailREGEX.test( $("#testEmail").val() )) { $("#mailResultCheck").addClass("alert-danger").removeClass("alert-success").removeClass('userInfos').html(errorMail); return false; } else { //external verifications and sets $.ajax( { url: "index.php", cache: false, type : "POST", data: { "mailMethod" : (($("input[name=PS_MAIL_METHOD]:checked").val() == 2) ? "smtp" : "native"), "smtpSrv" : $("input[name=PS_MAIL_SERVER]").val(), "testEmail" : $("#testEmail").val(), "smtpLogin" : $("input[name=PS_MAIL_USER]").val(), "smtpPassword" : $("input[name=PS_MAIL_PASSWD]").val(), "smtpPort" : $("input[name=PS_MAIL_SMTP_PORT]").val(), "smtpEnc" : $("select[name=PS_MAIL_SMTP_ENCRYPTION]").val(), "testMsg" : textMsg, "testSubject" : textSubject, "token" : token_mail, "ajax" : 1, "tab" : 'AdminEmails', "action" : 'sendMailTest' }, success: function(ret) { if (ret == "ok") { $("#mailResultCheck").addClass("alert-success").removeClass("alert-danger").removeClass('userInfos').html(textSendOk); mailIsOk = true; } else { mailIsOk = false; $("#mailResultCheck").addClass("alert-danger").removeClass("alert-success").removeClass('userInfos').html(textSendError + '<br />' + ret); } } } ); } } function checkLangPack(token){ if ($('#iso_code').val().length == 2) { $('#lang_pack_loading').show(); $('#lang_pack_msg').hide(); doAdminAjax( { controller:'AdminLanguages', action:'checkLangPack', token:token, ajax:1, iso_lang:($('#iso_code').val()).toLowerCase(), ps_version:$('#ps_version').val() }, function(ret) { $('#lang_pack_loading').hide(); ret = $.parseJSON(ret); if( ret.status == 'ok') { content = $.parseJSON(ret.content); message = langPackOk + ' <b>'+content['name'] + '</b>) :' +'<br />' + langPackVersion + ' ' + content['version'] + ' <a href="http://www.prestashop.com/download/lang_packs/gzip/' + content['version'] + '/' + ($('#iso_code').val()).toLowerCase()+'.gzip" target="_blank" class="link">'+download+'</a><br />' + langPackInfo; $('#lang_pack_msg').html(message); $('#lang_pack_msg').show(); } else showErrorMessage(ret.error); } ); } } function redirect(new_page) { window.location = new_page; } function saveCustomerNote(customerId){ var noteContent = $('#noteContent').val(); var data = 'token=' + token_admin_customers + '&tab=AdminCustomers&ajax=1&action=updateCustomerNote&id_customer=' + customerId + '¬e=' + encodeURIComponent(noteContent); $.ajax({ type: "POST", url: "index.php", data: data, async : true, success: function(r) { if (r == 'ok') { $('#submitCustomerNote').attr('disabled', true); } showSuccessMessage(update_success_msg); } }); } function isCleanHtml(content) { var events = 'onmousedown|onmousemove|onmmouseup|onmouseover|onmouseout|onload|onunload|onfocus|onblur|onchange'; events += '|onsubmit|ondblclick|onclick|onkeydown|onkeyup|onkeypress|onmouseenter|onmouseleave|onerror|onselect|onreset|onabort|ondragdrop|onresize|onactivate|onafterprint|onmoveend'; events += '|onafterupdate|onbeforeactivate|onbeforecopy|onbeforecut|onbeforedeactivate|onbeforeeditfocus|onbeforepaste|onbeforeprint|onbeforeunload|onbeforeupdate|onmove'; events += '|onbounce|oncellchange|oncontextmenu|oncontrolselect|oncopy|oncut|ondataavailable|ondatasetchanged|ondatasetcomplete|ondeactivate|ondrag|ondragend|ondragenter|onmousewheel'; events += '|ondragleave|ondragover|ondragstart|ondrop|onerrorupdate|onfilterchange|onfinish|onfocusin|onfocusout|onhashchange|onhelp|oninput|onlosecapture|onmessage|onmouseup|onmovestart'; events += '|onoffline|ononline|onpaste|onpropertychange|onreadystatechange|onresizeend|onresizestart|onrowenter|onrowexit|onrowsdelete|onrowsinserted|onscroll|onsearch|onselectionchange'; events += '|onselectstart|onstart|onstop'; var script1 = /<[\s]*script/im; var script2 = new RegExp('('+events+')[\s]*=', 'im'); var script3 = /.*script\:/im; var script4 = /<[\s]*(i?frame|embed|object)/im; if (script1.test(content) || script2.test(content) || script3.test(content) || script4.test(content)) return false; return true; } function parseDate(date){ return $.datepicker.parseDate("yy-mm-dd", date); } function refresh_kpis() { var force = (arguments.length == 1 && arguments[0] == true); $('.box-stats').each(function() { if ($(this).attr('id')) { var functionName = 'refresh_' + $(this).attr('id').replace(/-/g, '_'); if (typeof window[functionName] === 'function') { if (force) { window[functionName](true); // force refresh, ignoring cache delay } else { window[functionName](); } } } }); } function createSqlQueryName() { var container = false; var current = false; if ($('.breadcrumb')) { container = $('.breadcrumb li').eq(0).text().replace(/\s+/g, ' ').trim(); current = $('.breadcrumb li').eq(-1).text().replace(/\s+/g, ' ').trim(); } var title = false; if ($('h2.title')) title = $('h2.title').first().text().replace(/\s+/g, ' ').trim(); var name = false; if (container && current && container != current) name = container + ' > ' + current; else if (container) name = container; else if (current) name = current; if (title && title != current && title != container) { if (name) name = name + ' > ' + title; else name = title; } return name.trim(); } function confirm_link(head_text, display_text, confirm_text, cancel_text, confirm_link, cancel_link) { $.alerts.okButton = confirm_text; $.alerts.cancelButton = cancel_text; jConfirm(display_text, head_text, function(confirm){ if (confirm === true) document.location = confirm_link; else document.location = cancel_link; }); } function TogglePackage(detail) { var pack = $('#pack_items_' + detail); pack.css('display', (pack.css('display') == 'block') ? "none" : "block"); } function countDown($source, $target) { var max = $source.attr("data-maxchar"); $target.html(max-$source.val().length); $source.keyup(function(){ $target.html(max-$source.val().length); }); }
© 2017 -
ZeroByte.ID
.