Skip to content
This repository was archived by the owner on Sep 10, 2021. It is now read-only.

Commit ab217db

Browse files
author
Charles Ma
committed
ENH: refs #312 Fixed text on register page
Translated Add review page
1 parent be25fcd commit ab217db

File tree

5 files changed

+107
-77
lines changed

5 files changed

+107
-77
lines changed

core/layouts/layout.phtml

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php
1+
<?php
22
/*=========================================================================
33
MIDAS Server
44
Copyright (c) Kitware SAS. 20 rue de la Villette. All rights reserved.
@@ -9,26 +9,26 @@ This software is distributed WITHOUT ANY WARRANTY; without even
99
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
1010
PURPOSE. See the above copyright notices for more information.
1111
=========================================================================*/
12-
echo $this->doctype()
12+
echo $this->doctype()
1313
?>
1414
<html xmlns="http://www.w3.org/1999/xhtml">
1515
<head>
1616

1717
<!-- Meta -->
1818
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
1919
<title><?php echo $this->title ?></title>
20-
21-
<meta name="description" content="<?php echo htmlentities($this->metaDescription)?>" />
20+
21+
<meta name="description" content="<?php echo htmlentities($this->metaDescription)?>" />
2222
<meta name="keywords" content="<?php echo htmlentities($this->metaKeywords)?>" />
23-
<meta name="robots" content="index, follow, all" />
24-
<noscript>
25-
<meta http-equiv="refresh" content="1; URL=<?php echo $this->webroot?>/index/nojs">
26-
</noscript>
27-
23+
<meta name="robots" content="index, follow, all" />
24+
<noscript>
25+
<meta http-equiv="refresh" content="1; URL=<?php echo $this->webroot?>/index/nojs">
26+
</noscript>
27+
2828
<!--[if lte IE 6]>
29-
<meta http-equiv="refresh" content="1; URL=<?php echo $this->webroot?>/index/nobrowser">
29+
<meta http-equiv="refresh" content="1; URL=<?php echo $this->webroot?>/index/nobrowser">
3030
<![endif]-->
31-
31+
3232
<!-- Import CSS -->
3333
<link rel="shortcut icon" href="<?php echo $this->coreWebroot ?>/public/images/icons/favicon.ico" />
3434
<?php
@@ -53,7 +53,7 @@ echo $this->doctype()
5353
<![endif]-->
5454
<?php echo $this->headLink(); // import the css ?>
5555
<?php echo $this->headStyle(); // import the css ?>
56-
56+
5757
</head>
5858
<body>
5959
<div class="MainDialog" style="display:none;">
@@ -80,10 +80,10 @@ echo $this->doctype()
8080
<div class="TopbarLeft">
8181
<ul>
8282
<li class="first">
83-
<a href="http://www.kitware.com/midasindex.html" >MIDAS</a>
83+
<a target="_blank" href="http://midasplatform.org" >MIDAS</a>
8484
</li>
8585
<li>
86-
<a href="http://www.kitware.com" >Kitware</a>
86+
<a target="_blank" href="http://www.kitware.com" >Kitware</a>
8787
</li>
8888
</ul>
8989
</div>
@@ -104,8 +104,8 @@ echo $this->doctype()
104104
echo '
105105
<li onclick="location.replace(\''.$this->webroot.'/admin\');"><a>'.$this->t('Administration').'</a></li>';
106106
}
107-
108-
107+
108+
109109
$linksModules = Zend_Registry::get('notifier')->callback("CALLBACK_CORE_GET_USER_MENU", array());
110110
if(!empty($linksModules))
111111
{
@@ -126,7 +126,7 @@ echo $this->doctype()
126126
{
127127
echo '<b><a class="loginLink" href="#" >'.$this->t('Login').'</a></b>';
128128
}
129-
?>
129+
?>
130130
</li>
131131
<li>
132132
<?php
@@ -138,23 +138,23 @@ echo $this->doctype()
138138
{
139139
echo '<a class="registerLink" href="#" > '.$this->t('Register').'</a>';
140140
}
141-
?>
141+
?>
142142
</li>
143143
<li>
144144
<a href="#" > <?= $this->t('Help') ?></a>
145145
</li>
146146
<li>
147-
147+
148148
<a href="#" style="margin-right: 20px">
149-
150-
<?php
149+
150+
<?php
151151
echo $this->t('My Language');
152152
?>
153-
<img class="languageIcon" src="<?php echo $this->coreWebroot?>/public/images/icons/language.png" alt ="" />
153+
<img class="languageIcon" src="<?php echo $this->coreWebroot?>/public/images/icons/language.png" alt ="" />
154154
</a>
155155
<ul>
156156
<li>
157-
<?php
157+
<?php
158158
if($this->lang=='en')
159159
{
160160
echo '<a href="#"><b>English</b></a>';
@@ -166,7 +166,7 @@ echo $this->doctype()
166166
?>
167167
</li>
168168
<li>
169-
<?php
169+
<?php
170170
if($this->lang=='fr')
171171
{
172172
echo '<a href="#"><b>Francais</b></a>';
@@ -206,13 +206,13 @@ echo $this->doctype()
206206
</a>
207207
</li>
208208
</ul>
209-
<div class="viewNoticeWrapper">
209+
<div class="viewNoticeWrapper">
210210
<div class="viewNotice"></div>
211211
</div>
212212
</div>
213213
</div>
214214
</div>
215-
215+
216216
<div class="Wrapper">
217217
<?php
218218
if($this->needUpgrade)
@@ -242,7 +242,7 @@ echo $this->doctype()
242242
<li <?php if($this->activemenu=='uploaded') {echo 'class="active"';} ?> onclick="location.replace('<?php echo $this->webroot?>/browse/uploaded');" ><a href="<?php echo $this->webroot?>/browse/uploaded"><img alt="" src="<?php echo $this->coreWebroot?>/public/images/icons/addfile.png" /><span> <?php echo $this->t('My uploads');?></span></a></li>
243243
<?php
244244
}
245-
245+
246246
$linksModules = Zend_Registry::get('notifier')->callback("CALLBACK_CORE_GET_LEFT_LINKS", array());
247247
if(!empty($linksModules))
248248
{
@@ -276,7 +276,7 @@ echo $this->doctype()
276276
if(is_array($item))
277277
{
278278
echo "<li onclick=\"location.replace('{$this->webroot}/item/{$item['item_id']}');\" class='recentItem' qtip='". str_replace("'", '"', $item['name'])."'><a href='{$this->webroot}/item/{$item['item_id']}'>".$this->slicename($item['name'],20)."</a></li>";
279-
}
279+
}
280280
}
281281
echo '</ul>';
282282
}
@@ -289,13 +289,13 @@ echo $this->doctype()
289289
echo "<div class='viewHeader'>{$this->header} </div>";
290290
}
291291
?>
292-
292+
293293
<div class="viewWrapper">
294294
<!-- Content -->
295295
<?php echo $this->layout()->content ?>
296296
<!-- End Content -->
297-
298-
</div>
297+
298+
</div>
299299
<div class="clear"/>
300300
</div>
301301
</div>
@@ -307,7 +307,7 @@ echo $this->doctype()
307307
</div>
308308
</div>
309309
<hr style="display: none;"/>
310-
</div>
310+
</div>
311311
<?php
312312
if (Zend_Registry::get("configGlobal")->smartoptimizer == 1)
313313
{
@@ -328,7 +328,7 @@ echo $this->doctype()
328328
<?php echo $this->json?>
329329
</div>
330330
</body>
331-
331+
332332
<?php
333333
$footers = Zend_Registry::get('notifier')->callback("CALLBACK_CORE_GET_FOOTER_LAYOUT", array());
334334
if(!empty($footers))

core/public/js/item/item.view.js

Lines changed: 52 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
$(document).ready(function() {
2-
2+
33
$('a.metadataDeleteLink img').fadeTo("fast",0.4);
44
$('a.metadataDeleteLink').click(function(){
55
var metadataCell = $(this).parents('tr');
@@ -12,40 +12,40 @@
1212
html+='<input style="margin-left:140px;" class="globalButton deleteMetaDataYes" element="'+$(this).attr('element')+'" type="button" value="'+json.global.Yes+'"/>';
1313
html+='<input style="margin-left:50px;" class="globalButton deleteMetaDataNo" type="button" value="'+json.global.No+'"/>';
1414
showDialogWithContent(json.item.message['delete'],html,false);
15-
15+
1616
$('input.deleteMetaDataYes').unbind('click').click(function()
17-
{
17+
{
1818
$.post(json.global.webroot+'/item/'+json.item.item_id, { element: metadataId, deleteMetadata: true});
1919
metadataCell.remove();
2020
$( "div.MainDialog" ).dialog('close');
2121
});
2222
$('input.deleteMetaDataNo').unbind('click').click(function()
2323
{
2424
$( "div.MainDialog" ).dialog('close');
25-
});
25+
});
2626
});
2727
$('a.metadataEditLink img').fadeTo("fast",0.4);
28-
28+
2929
$('a.metadataEditLink').click(function(){
3030
var metadataId = $(this).attr('element');
3131
loadDialog("editmetadata"+metadataId, "/item/editmetadata/?metadataId="+metadataId+"&itemId="+json.item.item_id);
3232
showDialog('MetaData');
33-
33+
3434
});
3535
$('a.addMetadataLink').click(function(){
3636
var metadataId = $(this).attr('element');
3737
loadDialog("editmetadata"+metadataId, "/item/editmetadata/?itemId="+json.item.item_id);
3838
showDialog('MetaData');
39-
39+
4040
});
41-
42-
41+
42+
4343
$('a.moveCopyLink').click(function()
4444
{
4545
loadDialog("movecopy","/browse/movecopy/?move=false&items="+json.item.item_id);
4646
showDialog(json.item.message.movecopy);
4747
});
48-
48+
4949
$('a#itemDeleteLink').click(function()
5050
{
5151
var html='';
@@ -55,35 +55,63 @@
5555
html+='<br/>';
5656
html+='<input style="margin-left:140px;" class="globalButton deleteItemYes" element="'+$(this).attr('element')+'" type="button" value="'+json.global.Yes+'"/>';
5757
html+='<input style="margin-left:50px;" class="globalButton deleteItemNo" type="button" value="'+json.global.No+'"/>';
58-
58+
5959
showDialogWithContent(json.item.message['delete'],html,false);
60-
60+
6161
$('input.deleteItemYes').unbind('click').click(function()
62-
{
62+
{
6363
location.replace(json.global.webroot+'/item/delete?itemId='+json.item.item_id);
6464
});
6565
$('input.deleteItemNo').unbind('click').click(function()
6666
{
6767
$( "div.MainDialog" ).dialog('close');
68-
});
69-
68+
});
69+
7070
});
71-
71+
7272
$('a.sharingLink').click(function(){
7373
loadDialog("sharing"+$(this).attr('type')+$(this).attr('element'),"/share/dialog?type="+$(this).attr('type')+'&element='+$(this).attr('element'));
7474
showDialog(json.browse.share);
7575
});
76-
77-
$('a.uploadRevisionLink').click(function(){
78-
loadDialog("uploadrevision"+$(this).attr('element'),"/upload/revision?itemId="+$(this).attr('element'));
79-
showDialog($(this).html());
80-
});
81-
76+
77+
78+
var itemId = $('a.uploadRevisionLink').attr('element');
79+
$('a.uploadRevisionLink').qtip(
80+
{
81+
content: {
82+
// Set the text to an image HTML string with the correct src URL to the loading image you want to use
83+
text: '<img src="'+json.global.webroot+'/core/public/images/icons/loading.gif" alt="Loading..." />',
84+
ajax: {
85+
url: json.global.webroot+"/upload/revision?itemId="+itemId // Use the rel attribute of each element for the url to load
86+
},
87+
title: {
88+
text: $('a.uploadRevisionLink').html(), // Give the tooltip a title using each elements text
89+
button: true
90+
}
91+
},
92+
position: {
93+
at: 'bottom center', // Position the tooltip above the link
94+
my: 'top right',
95+
viewport: $(window), // Keep the tooltip on-screen at all times
96+
effect: true // Disable positioning animation
97+
},
98+
show: {
99+
event: 'click',
100+
solo: true // Only show one tooltip at a time
101+
},
102+
hide: {
103+
event: false
104+
},
105+
style: {
106+
classes: 'uploadqtip ui-tooltip-light ui-tooltip-shadow ui-tooltip-rounded'
107+
}
108+
})
109+
//$('.uploadqtip').css('z-index:500');
110+
82111
//edit
83112
$('a.editItemLink').click(function(){
84113
loadDialog("editItem"+json.item.item_id,"/item/edit?itemId="+json.item.item_id);
85114
showDialog(json.browse.edit,false);
86115
});
87-
116+
88117
});
89-

core/translation/fr-main.csv

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,4 +256,6 @@ This name is already used;Ce nom est d
256256
Name of the folder;Nom du r�pertoire
257257
Optional;Optionel
258258
Teaser;Courte descriptionMy Language;Ma Langue
259-
Delete the post;Supprimer la publication
259+
Delete the post;Supprimer la publication
260+
Step 3: Set the changes;Etape 3 : Indiquez les changements
261+
View new Revision;Voir nouvelle r�vision

0 commit comments

Comments
 (0)