Permalink
Browse files

Merge pull request #3 from elg/master

Different correction + main page refactoring / redesign.
  • Loading branch information...
2 parents a5c7f07 + 9c82bfb commit 32e52339fd9b5e74c105e63ba019bfc683c14db4 @elg elg committed Apr 18, 2012
Showing with 13 additions and 9 deletions.
  1. +5 −5 edit.html
  2. +3 −0 incl/css/edit.css
  3. +2 −2 incl/js/index.js
  4. +3 −2 message_service.php
View
@@ -140,7 +140,7 @@
}
var selectMessage = function (index) {
- beforeBlur();
+ beforeBlur(cat_id);
$('#msg_table').find('tbody tr.selected').removeClass('selected');
var arr_index = $('#msg_table').find('tbody tr:eq(' +(index)+ ')').addClass('selected').data('index');
fillEditBar(arr_index);
@@ -151,7 +151,7 @@
return $('#msg_table tr.selected').prevAll().length;
}
- var beforeBlur = function(){
+ var beforeBlur = function(catalogue_id){
if ( !$('#msg_table tr.selected').length ) return;
var $row = $('#msg_table tr:eq(' + getCurrentMessage() + ')');
@@ -166,7 +166,7 @@
msg.comments = $('#comments').val();
$row.trigger('sync');
$.messageService('updateMessage',
- [msg.msgid, msg.comments, msg.msgstr, msg.fuzzy],
+ [catalogue_id, msg.msgid, msg.comments, msg.msgstr, msg.fuzzy],
function() {}
);
}
@@ -353,7 +353,7 @@
<div id="errors"><p>-Error-</p><input type="submit" name="hideBtn" id="hideBtn" value="Hide"></div>
<div id="messages"><span></span></div>
<div id="nav">
- <a href="http://jenkins.devbk.net/job/trunk-i18n/build?token=ieb6uaQu&cause=SimplePO+manual+launch/">Deploy Langs</a>
+ <a href="https://github.com/pacifists/simplepo/">SimplePO</a>
<a href="index.html">Catalogue</a>
<div class="left">
<span id="cat_name"></span>
@@ -423,7 +423,7 @@
<div id="com_data"></div>
</div>
<div id="foot">
- <a href="http://code.google.com/p/simplepo/">Simple Po</a> by the hackers at <a href="http://www.yabla.com/">Yabla</a>
+Gettext edition becomes easy with <a href="https://github.com/pacifists/simplepo/">SimplePO</a>!
</div>
</body>
View
@@ -8,6 +8,9 @@ body,html {
/*background-color:#F4F4F8;*/
overflow-x:hidden;
}
+label {
+ color: white;
+}
#body_w {
margin:5px 5px 0 5px;
}
View
@@ -23,11 +23,11 @@ $( function(){
+ ''
+ '<div id="progress-bar" class="progress-bar green stripes">'
+ '<span style="width:'
- + parseInt(data[i].translated_count / data[i].message_count *100)
+ + parseInt(data[i].translated_count / (data[i].message_count -1) *100)
+ '%"></span>'
+ '</div>'
+ '<div id="percentage"><p class="percentage">'
- + data[i].translated_count + '/' + data[i].message_count +'</p></div>';
+ + data[i].translated_count + '/' + (data[i].message_count -1) +'</p></div>';
$container.append(html);
};
});
View
@@ -63,10 +63,11 @@ function getCatalogues(){
LEFT JOIN {messages} m ON m.catalogue_id=c.id
GROUP BY c.id")->fetchAll();
}
- function updateMessage($msgid, $comments, $msgstr, $fuzzy){
+ function updateMessage($catalogue_id, $msgid, $comments, $msgstr, $fuzzy){
$q = new Query();
$flags = $fuzzy ? 'fuzzy' : '';
- $q->sql("UPDATE {messages} SET comments=?, msgstr=?, flags=? WHERE msgid=?", $comments, $msgstr, $flags, $msgid)->execute();
+ $q->sql("UPDATE {messages} SET comments=?, msgstr=?, flags=? WHERE msgid=? AND catalogue_id=?", $comments, $msgstr, $flags, $msgid, $catalogue_id)->execute();
+ var_dump($catalogue_id);
echo "true";
}
function makeError() {

0 comments on commit 32e5233

Please sign in to comment.