Commit 706509e0ea58cd4d01c3652f0bceb0a6d9d210ca

Authored by Jarrett Jordaan
1 parent d8261a06

PT-2492070 : Login wizard updated for IE 7. IE specific css changes

Committed by: Jarrett Jordaan

Reviewed by: Megan Watson
setup/firstlogin/steps/firstloginTemplates.php
... ... @@ -91,19 +91,24 @@ class firstloginTemplates extends Step {
91 91 $ft_dir = FolderTemplatesPlugin_RDIR . DIRECTORY_SEPARATOR . "KTFolderTemplates.php";
92 92 }
93 93 $this->temp_variables['aFolderTemplates'] = $this->getTemplates();
  94 + $ftr = new FolderTemplateRenders(1);
  95 + $this->temp_variables['aTemplates'] = $ftr->renderTemplates();
94 96 $this->temp_variables['ft_dir'] = $ft_dir;
95 97 return 'landing';
96 98 }
97 99  
98 100 function applyTemplates() {
99 101 $templateId = KTUtil::arrayGet($_POST['data'], "templateId", 0);
  102 + $folderId = KTUtil::arrayGet($_POST['data'], "folderId", 1);
100 103 if($templateId < 1) {
101 104 $templateId = KTUtil::arrayGet($_GET, "templateId", 0);// Could be ajax call
102 105 }
103 106 if($templateId > 0) {
104 107 if (KTPluginUtil::pluginIsActive('folder.templates.plugin')) { // Check if folder templates plugin is active
  108 +
105 109 require_once(FolderTemplatesPlugin_DIR . DIRECTORY_SEPARATOR . "FolderTemplate.inc.php");
106   - return FolderTemplates::firstLoginAction(1, $templateId);
  110 +
  111 + return FolderTemplates::firstLoginAction($folderId, $templateId);
107 112 }
108 113 }
109 114 return false;
... ... @@ -112,6 +117,7 @@ class firstloginTemplates extends Step {
112 117 function getTemplates() {
113 118 if (KTPluginUtil::pluginIsActive('folder.templates.plugin')) { // Check if folder templates plugin is active
114 119 require_once(FolderTemplatesPlugin_DIR . DIRECTORY_SEPARATOR . "FolderTemplate.inc.php");
  120 +
115 121 return FolderTemplates::getList();
116 122 }
117 123 }
... ...
setup/firstlogin/templates/templates.tpl
... ... @@ -16,39 +16,56 @@
16 16 ?>
17 17 </select>
18 18 </div>
19   -<!-- <br>-->
20   -<!-- <br>-->
21 19 Folder Template Layout :
22 20 <br>
23 21 <br>
24   - <div class="tree_navigation">
25   - <table cellspacing="0" class="tree_table">
26   - <?php
27   - foreach ($aFolderTemplates as $oFolderTemplate) {
28   - ?>
29   - <tr class="templates" style="display:none;" id="template_<?php echo $oFolderTemplate->getId(); ?>">
30   - <td>
31   - <div id="tconnector_template_<?php echo $oFolderTemplate->getId(); ?>" class="tree_icon connector-open-first open-first">&nbsp;</div>
32   - </td>
33   - <td>
34   - <div class="tree_icon tree_folder closed">&nbsp;</div>
35   - </td>
36   - <td>
37   - <label>
38   - <?php
39   - echo $oFolderTemplate->getName();
40   - ?>
41   - </label>
42   - </td>
43   - </tr>
44   - <tr>
45   - <td id="templates_<?php echo $oFolderTemplate->getId(); ?>" class="templates"></td>
46   - </tr>
47   - <?php
48   - }
49   - ?>
50   - </table>
51   - </div>
  22 + <div class="tree_navigation">
  23 + <table class="tree_table main" cellspacing="0" cellpadding="0">
  24 + <tbody>
  25 + <tr>
  26 + <td>
  27 + <div id="tree_edit"></div>
  28 + </td>
  29 + </tr>
  30 + <tr>
  31 + <td>
  32 + <div id="templatesNode">
  33 + <table class="tree_table aContainer" cellspacing="0" cellpadding="0">
  34 + <tbody>
  35 + <tr>
  36 + <td>
  37 + <?php
  38 + foreach ($aFolderTemplates as $oFolderTemplate) {
  39 + ?>
  40 + <table class="templates" cellspacing="0" cellpadding="0" id="template_<?php echo $oFolderTemplate->getId(); ?>" style="display:none;">
  41 + <tr>
  42 + <td><div id="tconnector_template_<?php echo $oFolderTemplate->getId(); ?>" class="tree_icon connector-open-first open-first">&nbsp;</div></td>
  43 + <td>
  44 + <div class="tree_icon tree_folder closed">&nbsp;</div>
  45 + </td>
  46 + <td>
  47 + <label> <?php echo $oFolderTemplate->getName(); ?> </label>
  48 + </td>
  49 + </tr>
  50 + </table>
  51 + <table class="tree_table" cellspacing="0" cellpadding="0">
  52 + <tr>
  53 + <td id="templates_<?php echo $oFolderTemplate->getId(); ?>" class="template_nodes"></td>
  54 + </tr>
  55 + </table>
  56 + <?php
  57 + }
  58 + ?>
  59 + <td>
  60 + </tr>
  61 + </tbody>
  62 + </table>
  63 + </div>
  64 + </td>
  65 + </tr>
  66 + </tbody>
  67 + </table>
  68 + </div>
52 69 </div>
53 70 <input id="skip" type="submit" name="Skip" value="Skip" class="button_skip"/>
54 71 <input id="next" type="submit" name="Next" value="Next" class="button_next"/>
... ...
setup/firstlogin/templates/wizard.tpl
... ... @@ -12,6 +12,7 @@
12 12 <?php if(AGENT == "IE6") echo $html->css('ie6.css'); ?>
13 13 <?php if(AGENT == "IE7") echo $html->css('ie7.css'); ?>
14 14 <?php if(AGENT == "IE8") echo $html->css('ie8.css'); ?>
  15 + <?php if(AGENT == "ff2") echo $html->css('ff2.css'); ?>
15 16 <?php if(INSTALL_TYPE == "community") echo $html->css('community.css'); ?>
16 17 <meta http-equiv=Content-Type content="text/html; charset=utf-8">
17 18 </head>
... ...
setup/wizard/path.php
... ... @@ -51,6 +51,8 @@
51 51 define('AGENT', 'IE7');
52 52 } else if(preg_match("/MSIE 8\.\d/", $browser)) {
53 53 define('AGENT', 'IE8');
  54 + } else if(preg_match("/Firefox\/2\.\d/", $browser)) {
  55 + define('AGENT', 'FF2');
54 56 } else {
55 57 define('AGENT', 'OTHER');
56 58 }
... ...
setup/wizard/resources/css/ff2.css 0 → 100644
  1 +.tree_table { /* Override */
  2 + width:700px;
  3 +}
... ...
setup/wizard/resources/css/firstlogin.css
1   -#outer-wrapper {
2   - width:900px;
3   -}
4   -
5 1 #logo {
6 2 right:70%;
7 3 }
... ... @@ -19,11 +15,9 @@
19 15 margin-top:10px;
20 16 }
21 17  
22   -.tree_icon {
23   - float:left;
24   - height:16px;
25   - width:16px;
26   - cursor: pointer;
  18 +
  19 +#template_options {
  20 + width : 20px;
27 21 }
28 22  
29 23 .tree_folder {
... ... @@ -59,32 +53,6 @@
59 53 background-image:url(../../../../thirdpartyjs/extjs/resources/images/default/tree/elbow-end-minus.gif);
60 54 }
61 55  
62   -#tree_editable {
63   - float : right;
64   - width: 700px;
65   -}
66   -
67   -.tree_navigation {
68   - align : left;
69   - width:600px;
70   - min-height: 200px;
71   - float:left;
72   -}
73   -
74   -.tree_table {
75   - width:100%;
76   -}
77   -
78   -.tree_table td {
79   - float:left;
80   - line-height:1.8em;
81   - padding: 0px 0px;
82   -}
83   -
84   -.outer {
85   - align : left;
86   -}
87   -
88 56 .tree_node_edit {
89 57 background-image:url(../../../../thirdparty/icon-theme/16x16/actions/document-properties.png);
90 58 }
... ... @@ -101,10 +69,23 @@
101 69 background-image:url(graphics/question.gif);
102 70 }
103 71  
104   -#template_options {
105   - width : 20px;
  72 +#tree_editable {
  73 + float : right;
  74 + width: 700px;
  75 +}
  76 +
  77 +.tree_table td {
  78 + float:left;
  79 + padding: 1px 1px;
106 80 }
107 81  
108 82 .action_form {
109 83 margin-left:35px;
  84 +}
  85 +
  86 +.tree_icon {
  87 + float:left;
  88 + height:16px;
  89 + width:16px;
  90 + cursor: pointer;
110 91 }
111 92 \ No newline at end of file
... ...
setup/wizard/resources/css/ie7.css
1 1 #logo {
2 2 right:70%;
3 3 }
  4 +
... ...
setup/wizard/resources/js/firstlogin.js
... ... @@ -10,7 +10,6 @@ jQuery(function() { // Document is ready
10 10 function firstlogin(rootUrl, pluginHandle) {
11 11 this.rootUrl = rootUrl + "/";
12 12 this.ktfolderAccess = rootUrl + "/" + pluginHandle + "?action=";
13   - this.ktmanageFolderAccess = rootUrl + "/" + "admin.php?kt_path_info=misc/adminfoldertemplatesmanagement&action=";
14 13 this.ajaxOn = false;
15 14 }
16 15  
... ...