Skip to content

Commit

Permalink
Various improvements and bug fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
mfakih committed Jan 9, 2020
1 parent cc4a143 commit ddfb33b
Show file tree
Hide file tree
Showing 29 changed files with 4,168 additions and 943 deletions.
2 changes: 1 addition & 1 deletion grails-app/conf/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ info:
grailsVersion: '@info.app.grailsVersion@'
server:
contextPath: '/nibras'
port: 1440 # The port to listen on
port: 443 # The port to listen on
ssl:
enabled: true # Activate HTTPS mode on the server port
key-store: keystore.jks # e.g. /etc/tomcat7/keystore/tomcat.keystore
Expand Down
3 changes: 0 additions & 3 deletions grails-app/controllers/app/IndicatorController.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ package app

import java.text.SimpleDateFormat

import jxl.*
import jxl.format.*
import jxl.write.*
import grails.plugin.springsecurity.annotation.Secured

@Secured('ROLE_ADMIN')
Expand Down
3 changes: 0 additions & 3 deletions grails-app/controllers/app/IndicatorDataController.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ package app

import java.text.SimpleDateFormat

import jxl.*
import jxl.format.*
import jxl.write.*
import grails.plugin.springsecurity.annotation.Secured

@Secured('ROLE_ADMIN')
Expand Down
380 changes: 276 additions & 104 deletions grails-app/controllers/ker/GenericsController.groovy

Large diffs are not rendered by default.

29 changes: 28 additions & 1 deletion grails-app/controllers/ker/PageController.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -276,9 +276,30 @@ class PageController {
// println 'r ' + resources
// println 'e ' + excerpts

def ips = []
def ip
def interf

def interfaces = NetworkInterface.getNetworkInterfaces()

while (interfaces.hasMoreElements()) {

interf = interfaces.nextElement()
def addresses = interf.getInetAddresses()

while (addresses.hasMoreElements()) {
ip = addresses.nextElement().getHostAddress().toString()
if (ip && ip != '' && !ip.contains(':') && !ip.startsWith('127'))
ips.add([name: interf.getName(), title: interf.getDisplayName(), ip: ip])
// println (addresses.nextElement().getCanonicalHostName())
// println (addresses.nextElement().hostAddress)
}
}


render(view: '/appMain/main', model: [
htmlContent: null,
ips: ips,
selectBasketCount: GenericsController.selectedRecords.size(),
editFileCount: c,
reviewPileSize: resources.size() + excerpts.size()
Expand All @@ -300,6 +321,12 @@ class PageController {
])
}

def appKanban() {

render(view: '/appKanban/main', model: [])

}

def appDaftar(){
render(view: '/appMain/daftar', model: [])
}
Expand Down Expand Up @@ -414,7 +441,7 @@ class PageController {
}

def kanban() {
render(view: '/page/kanban', model: [])
render(view: '/page/kanbanCrs', model: [])
}

def kanbanCrs() {
Expand Down
3 changes: 2 additions & 1 deletion grails-app/controllers/ker/SyncController.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,8 @@ class SyncController {
def records = []
def priorityMap = [5: 'p5', 4: 'p4', 3: 'p3', 2: 'p2', 1: 'p1']

for (i in IndexCard.executeQuery("from Book where type.code != ? and type.code != ? and bookmarked = ? and lastUpdated > ? order by department.orderNumber asc, course.orderNumber asc, orderNumber asc", ['art', 'nws', true, new Date() - 7])) {
for (i in IndexCard.executeQuery("from Book where type.code != ? and type.code != ? and bookmarked = ? order by department.orderNumber asc, course.orderNumber asc, orderNumber asc",
['art', 'nws', true])) {
// OperationController.countResourceFiles(i.id)
records += [type : 'R', id: i.id,
rtype : i?.type?.code, ecode: 'R',
Expand Down
6 changes: 4 additions & 2 deletions grails-app/controllers/mcs/TaskController.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ class TaskController { // entity id = 127
def level = params.level

def date = params.date//.substring(0,3).toString()
def endDate = params.endDate//.substring(0,3).toString()
def stime
def etime
// if (params.date.length() > 3){
Expand All @@ -377,8 +378,8 @@ class TaskController { // entity id = 127

def startDate = OperationController.fromWeekDateAsDateTimeFullSyntax(date)
//Date.parse('dd.MM.yyyy HH:mm', supportService.fromWeekDate(date) + stime)
def endDate = startDate

def endDate = OperationController.fromWeekDateAsDateTimeFullSyntax(endDate)
/**
switch (level) {
case 'i':
endDate = startDate
Expand All @@ -403,6 +404,7 @@ class TaskController { // entity id = 127
break
}
*/

//Date.parse('dd.MM.yyyy HH:mm', supportService.fromWeekDate(date) + etime)

Expand Down
2 changes: 1 addition & 1 deletion grails-app/views/appCalendar/main.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
// columnHead: false
},
defaultView: 'dayGridWeek',
defaultView: 'dayGridMonth',
allDaySlot: true,
nowIndicator: true,
timeGridEventMinHeight: true,
Expand Down
18 changes: 18 additions & 0 deletions grails-app/views/appKanban/_east.gsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<%@ page import="mcs.parameters.ResourceStatus; mcs.Goal; org.apache.commons.lang.StringUtils; mcs.Book; app.parameters.ResourceType; mcs.Writing; mcs.Department; mcs.parameters.WritingType; app.Tag; cmn.Setting; mcs.Course; mcs.Journal; mcs.Planner; app.IndexCard; mcs.Task; ker.OperationController" %>

<div id="accordionEast" class="basic">

<h3><a href="#">
<g:message code="ui.details"></g:message>

</a></h3>

<div id="3rdPanel">

</div>





</div>
160 changes: 160 additions & 0 deletions grails-app/views/appKanban/_north.gsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
<%@ page import="ker.OperationController; java.text.DecimalFormat; cmn.Setting; grails.util.Metadata" %>

<table id="rssList" border="0" dir="ltr" cellspacing="2px" style="line-height: 15px;text-align: left; width: 95%">
<tr>
%{--<td>--}%
%{--&nbsp; <img src="${resource(dir: 'images', file: 'favicon-transparent.png')}" width="16px;"/>--}%
%{--&nbsp;--}%
%{--</td>--}%
<td style="padding-right: 1px !important;">
&nbsp;
&nbsp;
<g:remoteLink controller="report" action="homepageSavedSearches"

update="centralArea" title="Homepage saved searches">
%{--<span class="ui-icon ui-icon-calendar"></span>--}%



<span style="margin-right: 1px;">
<b style="font-size: 12px; font-family: tahoma, sans-serif;">
${OperationController.getPath('app.name') ?: 'Nibras'} /Kanban</b>
</span>
</g:remoteLink>

</td>

%{--<g:link controller="page" action="main"--}%
%{--title="">--}%

%{--<g:meta name="app.version"/>--}%
%{--todo--}%
%{--</g:link>--}%
%{--<g:if test="${OperationController.getPath('show.textlogo')?.toLowerCase() == 'yes' ? true : false}">--}%
%{--<sub>--}%
%{--<a href="http://pomegranate-pkm.org" target="_blank">--}%
%{--<i style="font-size: 10px; color: #ffffff">A Pomegranate PKM system</i>--}%
%{--</a>--}%
%{--</sub>--}%
%{--</g:if>--}%
<td style="padding-right: 5px !important;">
%{--<sec:ifAnyGranted roles="ROLE_ADMIN">--}%
<% Calendar c = new GregorianCalendar(); c.setLenient(false); c.setMinimalDaysInFirstWeek(4);
c.setFirstDayOfWeek(java.util.Calendar.MONDAY) %>
<b style="color: white">
%{-- Week ${c.get(Calendar.WEEK_OF_YEAR)}--}%
</b>
</td>
%{--</sec:ifAnyGranted>--}%





%{--<g:remoteLink controller="report" action="detailedAdd"--}%
%{--update="centralArea"--}%
%{--before="jQuery.address.value(jQuery(this).attr('href'));"--}%
%{--style=""--}%
%{--title="Add using forms">--}%
%{--<g:message code="ui.addRecords"></g:message>--}%
%{--</g:remoteLink>--}%

<td style="padding: 1px !important; margin-left: 9px; color: white;">

<g:formRemote name="batchAdd3"
url="[controller: 'generics', action: 'quickQuranSearch']"
update="centralArea" style="display: inline"
before="jQuery('#testTitle5').text('[3]: ' + jQuery('#testField5').val());"
method="post">

%{--<g:hiddenField name="sth2" value="${new java.util.Date()}"/>--}%
<g:submitButton name="batch" value="Execute"
style="margin: 0px; display: none"
id=" "
class="ui-widget ui-state-default"/>

<g:textField name="input" value="" id="speedsearch"
autocomplete="off"
style="float: right; display: inline; width: 220px !important; height: 24px; padding: 2px; margin: 1px; font-size: 11px;"
placeholder="Search..."
class=""/>

</g:formRemote>

</td>

%{--<td style="padding: 1px !important; margin-left: 9px; color: white;">--}%

%{--<a href="/nibras/sync/rssPile"--}%
%{--class="fg-button-icon-left"--}%
%{--style="" target="_blank">--}%
%{--<span style="color: white" class="ui-icon ui-icon-signal"></span>--}%
%{--<g:message code="ui.menu.RSS"></g:message>--}%
%{--</a>--}%
%{--</td>--}%

<td style="padding: 1px !important; margin-left: 9px; color: white;">

<a href="http://khuta.org/nibras-doc/index.html"
style="" target="_blank">
%{-- <span style="color: white" class="ui-icon ui-icon-help"></span>--}%
<g:message code="ui.menu.help"></g:message>
</a>
</td>
%{--<td>--}%
%{--بالصفحة--}%

%{--</td>--}%

%{--<li>--}%
%{----}%
%{--نسخه <i>--}%
%{----}%
%{--</i><g:meta name="app.version"/>--}%
%{--</li>--}%

</tr>
</table>




%{--<div id="dialog" title="Basic dialog">--}%
%{--<p>This is the default dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.</p>--}%
%{--</div>--}%

<script>
// $("#dialog").dialog();
function dualDisplay() {
document.getElementById("centralArea").id = "temp1q";
document.getElementById("sandboxPanel").id = "centralArea";
console.log('dual')
jQuery('#accordionEast').accordion({active: 3});
}
function singleDisplay() {
document.getElementById("temp1q").id = "centralArea";
document.getElementById("centralArea").id = "sandboxPanel";
console.log('single')
}
$('#selectAll').click(function (e) {
$("input[name^='select-']").each(function () {
// this['value'] = 'on'
this['checked'] = true
// console.log(this.attr('value'));
jQuery('#logRegion').load('/nibras/generics/selectOnly/' + this['name'].split('-')[2] + this['name'].split('-')[1]);
});
})
$('#deselectAll').click(function (e) {
$("input[name^='select-']").each(function () {
this['checked'] = false
// console.log(this.attr('value'));
jQuery('#logRegion').load('/nibras/generics/deselectOnly/' + this['name'].split('-')[2] + this['name'].split('-')[1]);
});
})
</script>
Loading

0 comments on commit ddfb33b

Please sign in to comment.