From fd612169d7dcf7055027cac9bd3fc37e10f00c1e Mon Sep 17 00:00:00 2001 From: liranbg Date: Sun, 5 Oct 2014 15:33:57 +0300 Subject: [PATCH] need to fix getting calendar lineToCourse --- main/LoginTab/loginhandler.cpp | 6 +- main/mainscreen.cpp | 64 +- main/mainscreen.ui | 1141 ++++++++++++++++++++- src/jceData/Calendar/calendarPage.cpp | 4 + src/jceData/Calendar/calendarSchedule.cpp | 14 +- src/jceData/page.cpp | 17 +- 6 files changed, 1205 insertions(+), 41 deletions(-) diff --git a/main/LoginTab/loginhandler.cpp b/main/LoginTab/loginhandler.cpp index 572bcb0..d83b741 100644 --- a/main/LoginTab/loginhandler.cpp +++ b/main/LoginTab/loginhandler.cpp @@ -125,13 +125,13 @@ void loginHandler::setLoginFlag(bool flag) } QString loginHandler::getCurrentPageContect() { - QTextEdit phrase; + QTextEdit parse; if (isLoggedInFlag()) - phrase.setText(jceLog->getPage()); + parse.setText(jceLog->getPage()); else throw jceLogin::ERROR_ON_GETTING_INFO; - return phrase.toPlainText(); + return parse.toPlainText(); } int loginHandler::makeGradeRequest(int fromYear, int toYear, int fromSemester, int toSemester) { diff --git a/main/mainscreen.cpp b/main/mainscreen.cpp index 1f6718c..1cf5a5f 100644 --- a/main/mainscreen.cpp +++ b/main/mainscreen.cpp @@ -233,39 +233,47 @@ void MainScreen::on_graphButton_clicked() { courseTableMgr->showGraph(); } + //EVENTS ON CALENDAR TAB void MainScreen::on_getCalendarBtn_clicked() { - ui->progressBar->setValue(0); - qDebug() << Q_FUNC_INFO << "in: " << ui->tabWidget->currentWidget()->objectName(); - int status = 0; - QApplication::setOverrideCursor(Qt::WaitCursor); - if (loginHandel->isLoggedInFlag()) - { - ui->statusBar->showMessage(tr("Getting schedule...")); - if ((status = loginHandel->makeCalendarRequest(ui->spinBoxYear->value(),ui->spinBoxSemester->value())) == jceLogin::JCE_PAGE_PASSED) - { + QString page; + calendar->resetTable(); + page = ui->plainTextEdit->toPlainText(); + calendar->setCalendar(page); + // ui->progressBar->setValue(0); + // qDebug() << Q_FUNC_INFO << "in: " << ui->tabWidget->currentWidget()->objectName(); + // int status = 0; + // QString page; + // QApplication::setOverrideCursor(Qt::WaitCursor); + // if (loginHandel->isLoggedInFlag()) + // { + // ui->statusBar->showMessage(tr("Getting schedule...")); + // if ((status = loginHandel->makeCalendarRequest(ui->spinBoxYear->value(),ui->spinBoxSemester->value())) == jceLogin::JCE_PAGE_PASSED) + // { - //Use it for debug. add plain text and change the object name to 'plainTextEdit' so you will get the html request - //ui->plainTextEdit->setPlainText(loginHandel->getCurrentPageContect()); - calendar->resetTable(); - ui->statusBar->showMessage(tr("Done. Inserting schdule into table..."),1000); - calendar->setCalendar(loginHandel->getCurrentPageContect()); - ui->progressBar->setValue(100); - qDebug() << Q_FUNC_INFO << "calendar is loaded"; - ui->statusBar->showMessage(tr("Done")); - } + // //Use it for debug. add plain text and change the object name to 'plainTextEdit' so you will get the html request + // //ui->plainTextEdit->setPlainText(loginHandel->getCurrentPageContect()); + // calendar->resetTable(); + // ui->statusBar->showMessage(tr("Done. Inserting schdule into table..."),1000); - else if (status == jceLogin::JCE_NOT_CONNECTED) - { - qWarning() << Q_FUNC_INFO << "not connected"; - QApplication::restoreOverrideCursor(); - QMessageBox::critical(this,tr("Error"),tr("Not Connected")); - } - else - qCritical() << Q_FUNC_INFO << "calendar get ended with" << status; - } - QApplication::restoreOverrideCursor(); + // page = loginHandel->getCurrentPageContect(); + // calendar->setCalendar(page); + // ui->progressBar->setValue(100); + // qDebug() << Q_FUNC_INFO << "calendar is loaded"; + // ui->statusBar->showMessage(tr("Done")); + // } + + // else if (status == jceLogin::JCE_NOT_CONNECTED) + // { + // qWarning() << Q_FUNC_INFO << "not connected"; + // QApplication::restoreOverrideCursor(); + // QMessageBox::critical(this,tr("Error"),tr("Not Connected")); + // } + // else + // qCritical() << Q_FUNC_INFO << "calendar get ended with" << status; + // } + // QApplication::restoreOverrideCursor(); } void MainScreen::on_exportToCVSBtn_clicked() { diff --git a/main/mainscreen.ui b/main/mainscreen.ui index 9d0528b..74e7a2c 100644 --- a/main/mainscreen.ui +++ b/main/mainscreen.ui @@ -64,7 +64,7 @@ background: qlineargradient(spread:pad, x1:0.496, y1:0, x2:0.508, y2:1, stop:0 r QTabWidget::Rounded - 1 + 2 false @@ -586,6 +586,1145 @@ font-size: 15px; + + + + class="menuheader expandable">קבצים להורדה</h3> + <ul class="categoryitems"> + + + <li> + <a href="javascript:send_form('Menu','-N,-A,-N,-N0134,','_self');"> + מינהל סטודנטים + </a> + </li> + + + <li> + <a href="javascript:send_form('Menu','-N,-A,-N,-N0138,','_self');"> + ועדת הוראה + </a> + </li> + + + <li> + <a href="javascript:send_form('Menu','-N,-A,-N,-N0125,','_self');"> + דיקנאט הסטודנטים + </a> + </li> + + + <li> + <a href="javascript:send_form('Menu','-N,-A,-N,-N0123,','_self');"> + מדור שכ"ל + </a> + </li> + + + </ul> + <h3 class="menuheader expandable">שאלות נפוצות</h3> + <ul class="categoryitems"> + + + <li> + <a href="javascript:send_form('Menu','-N,-A,-N,-N0151,','_self');"> + מינהל סטודנטים + </a> + </li> + + + <li> + <a href="javascript:send_form('Menu','-N,-A,-N,-N0152,','_self');"> + מדור בחינות + </a> + </li> + + + <li> + <a href="javascript:send_form('Menu','-N,-A,-N,-N0153,','_self');"> + ועדת הוראה + </a> + </li> + + + <li> + <a href="javascript:send_form('Menu','-N,-A,-N,-N0154,','_self');"> + מדור סיוע + </a> + </li> + + + <li> + <a href="javascript:send_form('Menu','-N,-A,-N,-N0155,','_self');"> + שכ"ל + </a> + </li> + + + </ul> + <h3 class="menuheader expandable">שנת הלימודים תשע"ה</h3> + <ul class="categoryitems"> + + + <li> + <a href="javascript:send_form('Menu','-N,-A,-N,-N0139,','_self');"> + לוחות תאריכים + </a> + </li> + + + <li> + <a href="javascript:send_form('Menu','-N,-A,-N,-N0140,','_self');"> + פתיחת שנה + </a> + </li> + + + </ul> + <h3 class="menuheader expandable">תוכניות לימודים</h3> + <ul class="categoryitems"> + + + <li> + <a href="javascript:send_form('Menu','-N,-A,-N,-N0126,','_self');"> + תעשייה וניהול + </a> + </li> + + + <li> + <a href="javascript:send_form('Menu','-N,-A,-N,-N0127,','_self');"> + אלקטרוניקה + </a> + </li> + + + <li> + <a href="javascript:send_form('Menu','-N,-A,-N,-N0128,','_self');"> + תוכנה + </a> + </li> + + + <li> + <a href="javascript:send_form('Menu','-N,-A,-N,-N0129,','_self');"> + חומרים מתקדמים + </a> + </li> + + + <li> + <a href="javascript:send_form('Menu','-N,-A,-N,-N0130,','_self');"> + פרמצבטית + </a> + </li> + + + <li> + <a href="javascript:send_form('Menu','-N,-A,-N,-N0132,','_self');"> + מכונות + </a> + </li> + + + </ul> + <h3 class="menuheader expandable">מלגות</h3> + <ul class="categoryitems"> + + + <li> + <a href="javascript:send_form('Menu','-N,-A,-N,-N0008,','_self');"> + הגשת בקשה למלגה + </a> + </li> + + + <li> + <a href="javascript:send_form('Menu','-N,-A,-N,-N0026,','_self');"> + צירוף קבצים למלגה + </a> + </li> + + + <li> + <a href="javascript:send_form('Menu','-N,-A,-N,-N0012,','_self');"> + עדכון פרטים אישיים + </a> + </li> + +</ul> + +</div> + +</td> + </tr> + </tbody> + </table></td> + </tr> + </tbody> + </table></td> + </tr> + + </tbody> + </table></td> + </tr> + </tbody> + </table></td> + </tr> + <tr> + <td class="bottomCornerBG"></td> + </tr> +</table> +</form> +</body> +</html> <!--FileName : Menu_Full_4.htm-->HTTP/1.1 200 OK +Date: Sun, 05 Oct 2014 11:29:00 GMT +Server: Microsoft-IIS/6.0 +X-Powered-By: ASP.NET +X-AspNet-Version: 2.0.50727 +Set-Cookie: ASP.NET_SessionId=j0hjp245bbmffs55nvais255; path=/; HttpOnly +Cache-Control: private +Content-Type: text/html; charset=utf-8 +Content-Length: 28103 + + <!DOCTYPE html> +<html lang="he"> +<head> + <meta charset="UTF-8"> + <noscript><meta http-equiv="X-Frame-Options" content="SameOrigin"></noscript> + + <title>תחנת מידע לסטודנט עזריאלי, מכללה אקדמית להנדסה ירושלים</title> + <link href="/info/MagicStyles_Type_2.css" rel="stylesheet" type="text/css"> +<link rel="stylesheet" href="/info/sort/jquery-ui-custom.css" type="text/css"> + <link rel="shortcut icon" href="/info/images/Favicon.ico"> + <link rel="icon" href="/info/images/Favicon.ico"> + <link rel="stylesheet" href="/info/sort/jquery.ui.timepicker.css" /> + <link rel="stylesheet" href="/info/sort/select2A.css"> + + <style type="text/css"> + textarea,input[type='text'], input[type='email'], input[type='password'] + { + border:1px solid #ccc; + padding:5px; + font-size:120%; + font-family:Arial,sans-serif; + } + #shadow { + background-image:url(/info/images/shade1x1.png); + position:absolute; + left:0; + top:0; + width:100%; + z-index:4999; +} +.cke_skin_kama td { + background-color: inherit !important; +} +body { + padding-right: 10px; + padding-left: 10px; +} +table.tablesorter { + font-family:arial; + background-color: #CDCDCD; + font-size: 8pt; + width: 97%; + text-align: right; +} +table.tablesorter thead tr th, table.tablesorter tfoot tr th { + border: 1px solid #FFF; + font-size: 8pt; + padding: 4px; +} +table.tablesorter tfoot td { + padding: 4px; +} +table.tablesorter thead tr .header { + background-image: url(/info/images/bgTitle.gif); + background-repeat: no-repeat; + background-position: left; + cursor: pointer; +} +table.tablesorter tbody td { + color: #3D3D3D; + padding: 4px; + background-color: #FFF; + vertical-align: top; +} +table.tablesorter tbody tr.odd td { + background-color:#F0F0F6; +} +table.tablesorter thead tr .headerSortUp { + background-image: url(/info/images/asc.gif); + background-position: left; +} +table.tablesorter thead tr .headerSortDown { + background-image: url(/info/images/desc.gif); + background-position: left; +} +table.tablesorter thead tr .headerSortDown, table.tablesorter thead tr .headerSortUp { +background-color: #8dbdd8; +} +#preview{ + position:absolute; + border:1px solid #ccc; + background:#333; + padding:5px; + display:none; + color:#fff; + } + + + +.buttonA, .buttonTOP { + padding: 4px 10px 3px 25px; + border: 1px solid #DE5D51; + position: relative; + cursor: pointer; + display: inline-block; + background-image: url( '/info/images/buttonJumpBackground_red.png' ); + background-repeat: repeat-x; + font-size: 11px; + text-decoration: none; + color: #9D271E; + -moz-border-radius-bottomleft: 5px; + -moz-border-radius-bottomright: 5px; + -moz-border-radius-topleft: 5px; + -moz-border-radius-topright: 5px; + font-family: Arial, Helvetica, sans-serif; + } + .buttonA img,.buttonTOP img { + position: absolute; + top: -4px; + left: -12px; + border: none; + } + .buttonA:hover { + color: #DE5D51; + border: 1px solid #FFB3AA; + } + .buttonA:disabled { + visibility: hidden; + } + + +.buttonA_Big { + padding: 4px 10px 3px 25px; + border: 1px solid #DE5D51; + position: relative; + cursor: pointer; + display: inline-block; + background-image: url( '/info/images/buttonJumpBackground_red.png' ); + background-repeat: repeat-x; + font-size: 13px; + font-weight: bold; + text-decoration: none; + color: #9D271E; + -moz-border-radius-bottomleft: 5px; + -moz-border-radius-bottomright: 5px; + -moz-border-radius-topleft: 5px; + -moz-border-radius-topright: 5px; + font-family: Arial, Helvetica, sans-serif; + } + .buttonA_Big img { + position: absolute; + top: -4px; + left: -12px; + border: none; + } + .buttonA_Big:hover { + color: #DE5D51; + border: 1px solid #FFB3AA; + } + .buttonA_Big:disabled { + visibility: hidden; + } + + + + + +</style> +</head> + <body OnLoad="AutoExec()" class= text style="margin: 0; direction: rtl;font-size:12px;" +> + + +<script type="text/javascript" src="/info/sort/jquery.min.js"></script> +<script type="text/javascript" src="/info/sort/jquery-migrate.js"></script> + + +<script type="text/javascript"> + var SessionMesIdStr,SessionResIdStr; + SessionMesIdStr = ","; + SessionResIdStr = ","; + + function ShowHideContent(id,type){ + if (type == "msg") { + if (SessionMesIdStr.indexOf(","+id+",") == -1){ + SessionMesIdStr = SessionMesIdStr + id + ","; + } + } + else { + if (SessionResIdStr.indexOf(","+id+",") == -1){ + + SessionResIdStr = SessionResIdStr + id + ","; + } + } + div = document.getElementById("div" + type + id); + img = document.getElementById("IMG" + id); + if (div.style.display == "none") + { + div.style.display = 'block'; + img.src = '/info/images/box_open.png'; + } + else + { + div.style.display='none'; + img.src ='/info/images/box_closed.png'; + } + window.focus() + } + + </script> +<script type="text/javascript" src="/info/sort/jquery.tooltipster.min.js"></script> +<script type="text/javascript" src="/info/sort/select2.min.js"></script> +<script type="text/javascript"> +if(!($.browser.msie && ($.browser.version=="6.0" || $.browser.version=="7.0" || $.browser.version=="8.0"))) +{ + $(document).ready(function() { + $('#bigger, #smaller, #ConB, #ConL, #ConW, #Excel, #Outlook,.AboutOpen').tooltipster(); + $("select").select2(); + }); +} +</script> + + +<script type="text/javascript" src="/info/sort/jquery.tablesorter.js"></script> + <script src="/info/sort/jquery.ui.timepicker.js"></script> + <script src="/info/sort/jquery.ui.timepicker-he.js"></script> + + <script src="/info/sort/jquery.lazyload.js" type="text/javascript" charset="utf-8"></script> + <script type="text/javascript"> + $(function() { + $("img").lazyload(); + }); + </script> + +<script type="text/javascript" src="/info/sort/jquery.cookie.js"></script> + +<script type="text/javascript"> + var min=10; + var max=20; + var fontsize=12; + var fontsizeTitles=17; + var fs_elements = 'div,td,th,#Yedion a,select,p,span'; + var fs_elementsTitles = 'h1,h2,.white'; +$(document).ready(function(e){ + if ($.cookie("fs_styles")!=null) { + if ($.cookie("fs_styles")!='white') { + change_style($.cookie("fs_styles")); + } + } + if (($.cookie("fs_elements")!=null)&&($.cookie("fs_elementsTitles")!=null)) { + fontsize=parseInt($.cookie("fs_elements")); + fontsizeTitles=parseInt($.cookie("fs_elementsTitles")); + $.cookie("fs_elements", fontsize, { expires: 30 }); + $.cookie("fs_elementsTitles", fontsizeTitles, { expires: 30 }); + set_fontsizes(); + } +}); +function set_fontsizes() { + $(fs_elements).css('fontSize',fontsize+'px'); + $(fs_elementsTitles).css('fontSize',fontsizeTitles+'px'); + $.cookie("fs_elements", fontsize, { expires: 30 }); + $.cookie("fs_elementsTitles", fontsizeTitles, { expires: 30 }); +} +function enlarge() { + if (fontsize<max) { + fontsize+=2; + fontsizeTitles+=2; + set_fontsizes(); + } +} +function change_style(styletype) { + switch(styletype) { + case 'black': $('body').css('backgroundColor','black'); + $('.text').css('color','white'); + $('body').css('backgroundImage',''); + $('.tablesorter').css('backgroundColor','#35B3DC'); + $(fs_elements).css('backgroundColor','black'); + $(fs_elements).css('color','yellow'); + $(fs_elementsTitles).css('color','yellow'); + break; + case 'blue': $('body').css('backgroundColor','rgb(194, 211, 252)'); + $('.text').css('color','white'); + $('body').css('backgroundImage',''); + $('.tablesorter').css('backgroundColor','#35B3DC'); + $(fs_elements).css('backgroundColor','rgb(194, 211, 252)'); + $(fs_elements).css('color','black'); + $(fs_elementsTitles).css('color','black'); + break; + default: $('body').css('backgroundColor','white'); + $('.text').css('color','white'); + $('body').css('backgroundImage','url(/info/images/tile.gif)'); + $('.tablesorter').css('backgroundColor','#CDCDCD'); + $(fs_elements).css('backgroundColor',''); + $(fs_elements).css('color','black'); + $(fs_elementsTitles).css('color','black'); + $('th').css('color','white'); + break; + } + $.cookie("fs_styles", styletype, { expires: 30 }); +} +function shrink() { + if (fontsize>min) { + fontsize-=2; + fontsizeTitles-=2; + set_fontsizes(); + } +} +</script> + +<noscript> +<!-- <p><br />הגדלה והקטנה של מלל<br /></p> --> +</noscript> + + + +<script type="text/javascript"> +this.imagePreview = function(){ + /* CONFIG */ + + xOffset = 10; + yOffset = -300; + + // these 2 variable determine popup's distance from the cursor + // you might want to adjust to get the right result + + /* END CONFIG */ + $("a.preview").hover(function(e){ + this.t = this.title; + this.title = ""; + var c = (this.t != "") ? "<br/>" + this.t : ""; + $("body").append("<p id='preview'><img src='"+ this.href +"' alt='Image preview'>"+ c +"<\/p>"); + $("#preview") + .css("top",(e.pageY - xOffset) + "px") + .css("left",(e.pageX + yOffset) + "px") + .fadeIn("fast"); + }, + function(){ + this.title = this.t; + $("#preview").remove(); + }); + $("a.preview").mousemove(function(e){ + $("#preview") + .css("top",(e.pageY - xOffset) + "px") + .css("left",(e.pageX + yOffset) + "px"); + }); +}; + + +// starting the script on page load +$(document).ready(function(){ + imagePreview(); +}); +</script> +<noscript> +<!-- <p><br />הגדלה של תמונה כאשר עוברים עליה<br /></p> --> +</noscript> + + <script type="text/javascript" src="/info/sort/jquery-ui.custom.min.js"></script> + + <script type="text/javascript" src="/info/sort/jquery.ui.datepicker-he.js"></script> + +<noscript> +<!-- <p><br />תאריכון<br /></p> --> +</noscript> +<!-- script src="/info/Scripts/AC_RunActiveContent.js" type="text/javascript"></script> --> +<script type="text/javascript"> +function AutoExec() +{ + if (typeof(document.form) != 'undefined') { + if (typeof(document.form.R1C1) != 'undefined') + document.form.R1C1.focus(); + + document.form.onsubmit = OnSubmit; + } + return; +} + +function OnSubmit () +{ + if (typeof(document.form) != 'undefined') { + if (document.form.APPNAME.value == "") + { + return false; + } + } + return true; +} + + + +function SubmitFormConfirm(Obj,app, prg, arg, trg, confirmQuestion) +{ + confirmQuestion = confirmQuestion.replace("\\n","\n"); + confirmQuestion = confirmQuestion.replace("\\n","\n"); + confirmQuestion = confirmQuestion.replace("\\n","\n"); + confirmQuestion = confirmQuestion.replace("\\n","\n"); + confirmQuestion = confirmQuestion.replace("\\n","\n"); + confirmQuestion = confirmQuestion.replace("\\n","\n"); + confirmQuestion = confirmQuestion.replace("\\n","\n"); + confirmQuestion = confirmQuestion.replace("\\n","\n"); + var conf = confirm(confirmQuestion); + if (conf) { + SubmitForm(Obj,app, prg, arg, trg); + } +} + +function SubmitForm(Obj,app, prg, arg, trg) +{ + if(Obj==null) + Obj=event.srcElement; + if(Obj==null) + return; + + bConfirm=Obj.getAttribute("Confirm"); + if (bConfirm=="true") + { + confirmQuestion = Obj.getAttribute("ConfirmQuestion"); + confirmQuestion = confirmQuestion.replace("\\n","\n"); + confirmQuestion = confirmQuestion.replace("\\n","\n"); + confirmQuestion = confirmQuestion.replace("\\n","\n"); + confirmQuestion = confirmQuestion.replace("\\n","\n"); + confirmQuestion = confirmQuestion.replace("\\n","\n"); + confirmQuestion = confirmQuestion.replace("\\n","\n"); + confirmQuestion = confirmQuestion.replace("\\n","\n"); + confirmQuestion = confirmQuestion.replace("\\n","\n"); + result = confirm (confirmQuestion); + if (!result) + { + return; + } + } + + if((trg!="_blank")&&(trg!="jq_float")) trg=""; + + document.form.APPNAME.value=app; + document.form.PRGNAME.value=prg; + document.form.ARGUMENTS.value=arg; + document.form.target=trg; + + document.form.submit(); +} +</script> +<noscript> +<!-- <p><br />הפעלת כפתורים<br /></p> --> +</noscript> + + + <script type="text/javascript"> + $(document).ready(function(){ + $(".buttonJump").hover(function(){ + $(".buttonJump img") + .animate({top:"-10px"}, 200).animate({top:"-4px"}, 200) // first jump + .animate({top:"-7px"}, 100).animate({top:"-4px"}, 100) // second jump + .animate({top:"-6px"}, 100).animate({top:"-4px"}, 100); // the last jump + }); + }); + </script> + + +<noscript> +<!-- <p><br />עיצוב של כפתור<br /></p> --> +</noscript> + + + +<!-- Text area --> + +<script type="text/javascript" src="/info/ckeditor/ckeditor.js"></script> + +<noscript> +<!-- <p><br />הגדרות בעת הפעלת עורך מלל<br /></p> --> +<!-- <p><br />הגדרות ראשוניות בעת אתחול עורך מלל<br /></p> --> +</noscript> + +<script type="text/javascript"> +if(!($.browser.msie)) + { + CKEDITOR.on( 'dialogDefinition', function( ev ) + { + var dialogName = ev.data.name; + var dialogDefinition = ev.data.definition; + if ( dialogName == 'link' ) + { + var targetTab = dialogDefinition.getContents( 'target' ); + var targetField = targetTab.get( 'linkTargetType' ); + targetField[ 'default' ] = '_blank'; + + } + }); + CKEDITOR.on('instanceReady', function(ev) { + ev.editor.on('paste', function(evt) { + evt.data.dataValue = evt.data.dataValue.replace(/target=".*?"/g, '' ); + evt.data.dataValue = evt.data.dataValue.replace(/href/g, 'target="_blank" href' ); + console.log(evt.data.dataValue); + }, null, null, 9); + }); + } +</script> +<!-- End of Text area --> + +<script type="text/javascript" src="/info/sort/RowColor.js"></script> + + <div style="width: 100%;"> + <span class="white" style="float:right;">תחנת מידע לסטודנט</span> + + <span style="float:left;">05/10/2014 + 14:29 + +<a class="buttonTOP" onClick="window.print()" accesskey="P"><img src="/info/images/Printer.PNG" style="top: 2px; left: 8px;" alt="">הדפס</a> + + +<a class="buttonTOP" onClick="enlarge();" accesskey="+"><img src="/info/images/zoom_in.PNG" style="top: 2px; left: 8px;" alt="הגדלת פונט ">הגדל</a> +<a class="buttonTOP" onClick="shrink();" accesskey="-"><img src="/info/images/zoom_out.PNG" style="top: 2px; left: 8px;" alt="הקטנת פונט ">הקטן</a> +<a class="buttonTOP" onClick="change_style('black');" accesskey="B"><img src="/info/images/black.gif" style="top: 1px; left: 10px;" alt="קונטרסט גבוה">&nbsp;</a> +<a class="buttonTOP" onClick="change_style('blue');" accesskey="L"><img src="/info/images/blue.gif" style="top: 1px; left: 10px;" alt="קונטרסט עדין">&nbsp;</a> +<a class="buttonTOP" onClick="change_style('white');" accesskey="W"><img src="/info/images/white.gif" style="top: 1px; left: 10px;" alt="קונטרסט ברירת מחדל">&nbsp;</a> + + + + <a class="buttonTOP" onClick="javascript:EXCEL()" accesskey="E"><img src="/info/images/xls.PNG" style="top: 2px; left: 8px;" alt="">אקסל</a> + <script type="text/javascript"> + function EXCEL() + { + window.open("fireflyweb.aspx?prgname=GetFile&Arguments=-N7","Grade_To_Excel", "menubar=yes,toolbar=no,resizable=yes,scrollbars=yes,width=700,height=500, top=100,left=100"); + } + </script> + + + + + + + + </span></div> + +<table style="width:100%;height:100%;border:0"> + <tr> + <td style="text-align:left"> + </table> +<br> + +<script type="text/javascript"> + function send_form(prgname,arguments,target) + { + var input = '<input type="hidden" name="prgname" value="'+prgname+'">'; + var input = input+'<input type="hidden" name="arguments" value="'+arguments+'">'; + $('<form method="post" action="fireflyweb.aspx" target="'+target+'">'+input+'</form>').appendTo('body').submit(); + } +</script> +<script type="text/javascript"> + function load_img(img_id,arg) + { + $.post('fireflyweb.aspx', + { + prgname: 'GetFile', + Arguments: arg, + IsItPost: 'Y' + },function(e){ + $('#'+img_id).html('<img src="data:image/jpg;base64,'+e+'" style="border:0;margin:2;" alt="תמונה ממסד הנתונים">'); + }); + } +</script> + <!--FileName : Header_Of_HTML_Type_3.HTM--> + + + <table style="text-align:right;width:98%;margin:auto;" class="text"> + <tr> + <td>שם סטודנט + </td> + + <td> + + <b>בן גידה לירן + </b> + </td> + + <td> + ת.ז. + </td> + <td> 302539556 + </td> + </tr> + + <tr> + <td>כתובת + </td> + <td> הסוללים 7 א' דירה 1 + </td> + + <td> + + תאריך + </td> + <td>05/10/2014 + </td> + + </tr> + + <tr> + <td>עיר + </td> + <td>ירושלים + </td> + + <td>מיקוד + </td> + <td>9371648 + </td> + </tr> + + <TR style="text-align:right"><td>חוג : </td><td>הנדסת תוכנה</td><td>התמחות</td><td>תוכנה</td></tr> + +</table> + +<h1 style="text-align:center">רשימת מערכת שעות שנה : 2015 סמסטר : 1 תשע"ה</h1> + + + + + + <script type="text/javascript"> + $(function() { + $("#myTable0").tablesorter(); +// $("#options").tablesorter({sortList: [[0,0]], headers: { 3:{sorter: false}, 4:{sorter: false}}}); + }); + </script> + + +<table style="text-align:right;width:98%;margin:auto;" class="tablesorter Mtable" ID="myTable0" summary="רשימת הקורסים"> +<thead> + <Tr> + <th style="width:50px">סמסטר</th> + <th>קוד קורס </th> + <th>שם הקורס </th> + <th>סוג מקצוע </th> + <th>שם המרצה </th> + <th style="width:30">נ"ז </th> + <th style="width:30">ש"ס</th> + <th style="width:90">יום ושעות </th> + <th>חדר </th> + <th>קוד קבוצה</th> + <th>חוג</th> + <th>אתר</th> + +</tr> +</thead> +<tbody> + <tr> + <td>א&nbsp; </td> + <td> 10001&nbsp; </td> + <td>אותות ומערכות&nbsp; </td> + <td>הרצאה&nbsp; + </td> + <td>ד"ר גור ערן&nbsp; </td> + <td> 4.50&nbsp; </td> + <td> 4.00&nbsp; </td> + <td style="width:direction:rtl;width:90"> +א'&nbsp;14:00&nbsp;-&nbsp;15:45 +</td> + <td>כתה- L208&nbsp; </td> + <td>100015101&nbsp; </td> + <td>תוכנה&nbsp; </td> + <td>&nbsp; </td> + +</tr> + <tr> + <td>א&nbsp; </td> + <td> 10001&nbsp; </td> + <td>אותות ומערכות&nbsp; </td> + <td>הרצאה&nbsp; + </td> + <td>ד"ר גור ערן&nbsp; </td> + <td>&nbsp; </td> + <td>&nbsp; </td> + <td style="width:direction:rtl;width:90"> +ב'&nbsp;12:00&nbsp;-&nbsp;13:45 +</td> + <td>כיתה-A102&nbsp; </td> + <td>100015101&nbsp; </td> + <td>תוכנה&nbsp; </td> + <td>&nbsp; </td> + +</tr> + <tr> + <td>א&nbsp; </td> + <td> 10001&nbsp; </td> + <td>אותות ומערכות&nbsp; </td> + <td>תרגיל&nbsp; + </td> + <td>ד"ר גור ערן&nbsp; </td> + <td>&nbsp; </td> + <td> 1.00&nbsp; </td> + <td style="width:direction:rtl;width:90"> +ג'&nbsp;13:00&nbsp;-&nbsp;13:45 +</td> + <td>כתה-L201&nbsp; </td> + <td>100015103&nbsp; </td> + <td>תוכנה&nbsp; </td> + <td>&nbsp; </td> + +</tr> + <tr> + <td>א&nbsp; </td> + <td> 10016&nbsp; </td> + <td>הסתברות וסטטיסטיקה 2&nbsp; </td> + <td>הרצאה&nbsp; + </td> + <td><a HREF="fireflyweb.aspx?prgname=Show_Teacher_Card&amp;arguments=-N77,-A" title="פתיחה בעמוד חדש של אתר המרצה" target="_blank">ד"ר ביגון בוריס</a>&nbsp; </td> + <td> 2.50&nbsp; </td> + <td> 2.00&nbsp; </td> + <td style="width:direction:rtl;width:90"> +א'&nbsp;12:00&nbsp;-&nbsp;13:45 +</td> + <td>כתה- L204&nbsp; </td> + <td>100165101&nbsp; </td> + <td>תוכנה&nbsp; </td> + <td>&nbsp; </td> + +</tr> + <tr> + <td>א&nbsp; </td> + <td> 10016&nbsp; </td> + <td>הסתברות וסטטיסטיקה 2&nbsp; </td> + <td>תרגיל&nbsp; + </td> + <td><a HREF="fireflyweb.aspx?prgname=Show_Teacher_Card&amp;arguments=-N589,-A" title="פתיחה בעמוד חדש של אתר המרצה" target="_blank">גב' שטיינבוך ביאנה</a>&nbsp; </td> + <td>&nbsp; </td> + <td> 1.00&nbsp; </td> + <td style="width:direction:rtl;width:90"> +ב'&nbsp;09:00&nbsp;-&nbsp;09:45 +</td> + <td>כתה- L206&nbsp; </td> + <td>100165103&nbsp; </td> + <td>תוכנה&nbsp; </td> + <td>&nbsp; </td> + +</tr> + <tr> + <td>א&nbsp; </td> + <td> 10039&nbsp; </td> + <td>יישומי תקשורת מחשבים&nbsp; </td> + <td>הרצאה&nbsp; + </td> + <td><a HREF="fireflyweb.aspx?prgname=Show_Teacher_Card&amp;arguments=-N284,-A" title="פתיחה בעמוד חדש של אתר המרצה" target="_blank">ד"ר צור-דוד שמרית</a>&nbsp; </td> + <td> 2.50&nbsp; </td> + <td> 2.00&nbsp; </td> + <td style="width:direction:rtl;width:90"> +ב'&nbsp;10:00&nbsp;-&nbsp;11:45 +</td> + <td>כיתה-A102&nbsp; </td> + <td>100395101&nbsp; </td> + <td>תוכנה&nbsp; </td> + <td>&nbsp; </td> + +</tr> + <tr> + <td>א&nbsp; </td> + <td> 10039&nbsp; </td> + <td>יישומי תקשורת מחשבים&nbsp; </td> + <td>מעבדה&nbsp; + </td> + <td><a HREF="fireflyweb.aspx?prgname=Show_Teacher_Card&amp;arguments=-N284,-A" title="פתיחה בעמוד חדש של אתר המרצה" target="_blank">ד"ר צור-דוד שמרית</a>&nbsp; </td> + <td>&nbsp; </td> + <td> 1.00&nbsp; </td> + <td style="width:direction:rtl;width:90"> +ד'&nbsp;12:00&nbsp;-&nbsp;12:45 +</td> + <td>כיתת מחשבים-מ326&nbsp; </td> + <td>100395103&nbsp; </td> + <td>תוכנה&nbsp; </td> + <td>&nbsp; </td> + +</tr> + <tr> + <td>א&nbsp; </td> + <td> 10061&nbsp; </td> + <td>תקשורת מחשבים&nbsp; </td> + <td>הרצאה&nbsp; + </td> + <td><a HREF="fireflyweb.aspx?prgname=Show_Teacher_Card&amp;arguments=-N47,-A" title="פתיחה בעמוד חדש של אתר המרצה" target="_blank">ד"ר אקסמן יעקב</a>&nbsp; </td> + <td> 3.50&nbsp; </td> + <td> 3.00&nbsp; </td> + <td style="width:direction:rtl;width:90"> +ג'&nbsp;09:00&nbsp;-&nbsp;11:45 +</td> + <td>כיתה A106&nbsp; </td> + <td>100615101&nbsp; </td> + <td>תוכנה&nbsp; </td> + <td>&nbsp; </td> + +</tr> + <tr> + <td>א&nbsp; </td> + <td> 10061&nbsp; </td> + <td>תקשורת מחשבים&nbsp; </td> + <td>תרגיל&nbsp; + </td> + <td><a HREF="fireflyweb.aspx?prgname=Show_Teacher_Card&amp;arguments=-N742,-A" title="פתיחה בעמוד חדש של אתר המרצה" target="_blank">גב' נתנזון מרים</a>&nbsp; </td> + <td>&nbsp; </td> + <td> 1.00&nbsp; </td> + <td style="width:direction:rtl;width:90"> +ג'&nbsp;12:00&nbsp;-&nbsp;12:45 +</td> + <td>כיתת מחשבים A114&nbsp; </td> + <td>100615102&nbsp; </td> + <td>תוכנה&nbsp; </td> + <td>&nbsp; </td> + +</tr> + <tr> + <td>א&nbsp; </td> + <td> 10077&nbsp; </td> + <td>מבוא לתכנות מדעי&nbsp; </td> + <td>הרצאה&nbsp; + </td> + <td><a HREF="fireflyweb.aspx?prgname=Show_Teacher_Card&amp;arguments=-N135,-A" title="פתיחה בעמוד חדש של אתר המרצה" target="_blank">ד"ר חסין יהודה</a>&nbsp; </td> + <td> 3.50&nbsp; </td> + <td> 3.00&nbsp; </td> + <td style="width:direction:rtl;width:90"> +ד'&nbsp;08:00&nbsp;-&nbsp;10:45 +</td> + <td>אודיטוריום-001&nbsp; </td> + <td>100775101&nbsp; </td> + <td>תוכנה&nbsp; </td> + <td>&nbsp; </td> + +</tr> + <tr> + <td>א&nbsp; </td> + <td> 10077&nbsp; </td> + <td>מבוא לתכנות מדעי&nbsp; </td> + <td>תרגיל&nbsp; + </td> + <td><a HREF="fireflyweb.aspx?prgname=Show_Teacher_Card&amp;arguments=-N172,-A" title="פתיחה בעמוד חדש של אתר המרצה" target="_blank">מר הראלי שלמה</a>&nbsp; </td> + <td>&nbsp; </td> + <td> 1.00&nbsp; </td> + <td style="width:direction:rtl;width:90"> +ד'&nbsp;11:00&nbsp;-&nbsp;11:45 +</td> + <td>כיתת מחשבים-מ150&nbsp; </td> + <td>100775102&nbsp; </td> + <td>תוכנה&nbsp; </td> + <td>&nbsp; </td> + +</tr> + <tr> + <td>א&nbsp; </td> + <td> 10087&nbsp; </td> + <td>אוטומטים ושפות פורמליות&nbsp; </td> + <td>הרצאה&nbsp; + </td> + <td><a HREF="fireflyweb.aspx?prgname=Show_Teacher_Card&amp;arguments=-N233,-A" title="פתיחה בעמוד חדש של אתר המרצה" target="_blank">ד"ר רודה יואב</a>&nbsp; </td> + <td> 2.50&nbsp; </td> + <td> 2.00&nbsp; </td> + <td style="width:direction:rtl;width:90"> +ד'&nbsp;14:00&nbsp;-&nbsp;15:45 +</td> + <td>כיתה A103&nbsp; </td> + <td>100875101&nbsp; </td> + <td>תוכנה&nbsp; </td> + <td>&nbsp; </td> + +</tr> + <tr> + <td>א&nbsp; </td> + <td> 10087&nbsp; </td> + <td>אוטומטים ושפות פורמליות&nbsp; </td> + <td>תרגיל&nbsp; + </td> + <td>מר ידגר הראל עוז&nbsp; </td> + <td>&nbsp; </td> + <td> 1.00&nbsp; </td> + <td style="width:direction:rtl;width:90"> +ג'&nbsp;14:00&nbsp;-&nbsp;14:45 +</td> + <td>כתה-L201&nbsp; </td> + <td>100875103&nbsp; </td> + <td>תוכנה&nbsp; </td> + <td>&nbsp; </td> + +</tr> + <tr> + <td>א&nbsp; </td> + <td> 10091&nbsp; </td> + <td>תכנות בסביבת אינטרנט&nbsp; </td> + <td>הרצאה&nbsp; + </td> + <td><a HREF="fireflyweb.aspx?prgname=Show_Teacher_Card&amp;arguments=-N282,-A" title="פתיחה בעמוד חדש של אתר המרצה" target="_blank">מר תבור שי</a>&nbsp; </td> + <td> 2.50&nbsp; </td> + <td> 2.00&nbsp; </td> + <td style="width:direction:rtl;width:90"> +א'&nbsp;10:00&nbsp;-&nbsp;11:45 +</td> + <td>אודיטוריום-201&nbsp; </td> + <td>100915101&nbsp; </td> + <td>תוכנה&nbsp; </td> + <td>&nbsp; </td> + +</tr> + <tr> + <td>א&nbsp; </td> + <td> 10091&nbsp; </td> + <td>תכנות בסביבת אינטרנט&nbsp; </td> + <td>תרגיל&nbsp; + </td> + <td><a HREF="fireflyweb.aspx?prgname=Show_Teacher_Card&amp;arguments=-N282,-A" title="פתיחה בעמוד חדש של אתר המרצה" target="_blank">מר תבור שי</a>&nbsp; </td> + <td>&nbsp; </td> + <td> 1.00&nbsp; </td> + <td style="width:direction:rtl;width:90"> +ב'&nbsp;08:00&nbsp;-&nbsp;08:45 +</td> + <td>כיתת מחשבים A114&nbsp; </td> + <td>100915102&nbsp; </td> + <td>תוכנה&nbsp; </td> + <td>&nbsp; </td> + +</tr> +</tbody> +<tfoot> + <tr> + <td colspan=5>סה"כ נקודות זכות לסמסטר זה +( + קורס שנתי יחושב כמחצית בכל סמסטר +) </td> + <td><b>21.50</b></td> + <td><b>25.00</b></td> + <td colspan=5>&nbsp; </td> +</tr> +</tfoot> +</table> + +<div style="text-align:right" class="text"> + +<br> +ט.ל.ח +<br> +רשימת מערכת שעות שנה : 2015 סמסטר : 1 מותנה בעמידה בתנאי הקדם לקורסים +<br> + +רשימת מערכת שעות שנה : 2015 סמסטר : 1 זו אינה מהווה אישור רשמי של עזריאלי, מכללה אקדמית להנדסה ירושלים +</div> + +<script type="text/javascript"> propagateEventHandler(document.getElementById("myTable0"), "onmouseover", "TR", highlightTableRow, "lightblue");</script> + </body></html> + <!--FileName : TimeTable_List_For_Student.htm-->" + + + diff --git a/src/jceData/Calendar/calendarPage.cpp b/src/jceData/Calendar/calendarPage.cpp index 4084545..2566146 100644 --- a/src/jceData/Calendar/calendarPage.cpp +++ b/src/jceData/Calendar/calendarPage.cpp @@ -8,10 +8,13 @@ QString CalendarPage::htmlToString() void CalendarPage::setPage(QString html) { + qDebug() << "parsing calendar"; courses = new std::list(); tempHtml = getString(html); tempHtml = tokenToLines(tempHtml); + qDebug() << "creating courses list"; calendarListInit(tempHtml); + qDebug() << "done"; } @@ -114,6 +117,7 @@ calendarCourse *CalendarPage::lineToCourse(QString line) else room = ROOM_DEFAULT_STRING; + qDebug() << serial << name << type << lecturer << points << semesterHours << dayAndHour << room; tempC = new calendarCourse(serial,name,type,lecturer,points,semesterHours,dayAndHour,room); return tempC; diff --git a/src/jceData/Calendar/calendarSchedule.cpp b/src/jceData/Calendar/calendarSchedule.cpp index 98f8421..e569c47 100644 --- a/src/jceData/Calendar/calendarSchedule.cpp +++ b/src/jceData/Calendar/calendarSchedule.cpp @@ -37,8 +37,8 @@ calendarSchedule::calendarSchedule() void calendarSchedule::setPage(QString html) { CalendarPage::setPage(html); - - insertCourseIntoTable(); + qDebug() << Q_FUNC_INFO << "inserting into table"; +// insertCourseIntoTable(); } void calendarSchedule::clearTableItems() @@ -57,15 +57,17 @@ void calendarSchedule::insertCourseIntoTable() QTableWidgetItem *item; QString courseString; - int currentHour,currentDay,blocksNumer; + int currentHour,currentDay,blocksNumber; int row,col; for (calendarCourse *coursePtr: *getCourses()) { + qDebug() << coursePtr->getSerialNum(); courseString = ""; currentHour = coursePtr->getHourBegin(); currentDay = coursePtr->getDay(); - blocksNumer = coursePtr->getHourEnd() - coursePtr->getHourBegin(); //every hour is a block to fill! - while (blocksNumer >= 0) + blocksNumber = coursePtr->getHourEnd() - coursePtr->getHourBegin(); //every hour is a block to fill! + qDebug() << blocksNumber; + while (blocksNumber >= 0) { row = currentHour - HOURS_BEGIN; col = currentDay-1; @@ -88,7 +90,7 @@ void calendarSchedule::insertCourseIntoTable() this->setItem(row,col,item); currentHour++; - --blocksNumer; + --blocksNumber; } horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents); verticalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents); diff --git a/src/jceData/page.cpp b/src/jceData/page.cpp index 38b9ac9..7c65231 100644 --- a/src/jceData/page.cpp +++ b/src/jceData/page.cpp @@ -36,7 +36,8 @@ void Page::manageTableContent(QString &html, int index) QString tableTag = html.mid(i, 4); //legth of "tr/td" if (tableTag == "") { - temp += dateHeader; + if (!dateHeader.isEmpty()) + temp += dateHeader; i = stitchText(html, temp, i+4); if (i == -1) //EOF break; @@ -49,7 +50,8 @@ void Page::manageTableContent(QString &html, int index) } else if (tableTag == "" || tableTag == "") { - temp += "\t"; // new cell -> tab between data + if (!dateHeader.isEmpty()) + temp += "\t"; // new cell -> tab between data if (html.mid(i, 6) == "") + break; i++; + } i = stitchText(html, temp, i); }