Persönliche Werkzeuge

Test Bogenteile Vergleichen

Aus BogenWiki

(Unterschied zwischen Versionen)
Wechseln zu: Navigation, Suche
 
(Der Versionsvergleich bezieht 178 dazwischenliegende Versionen mit ein.)
Zeile 11: Zeile 11:
     </td>
     </td>
     <td id="Frame.TopRight">
     <td id="Frame.TopRight">
-
       <div id="BGF.BtV.Data" style="width:100%;">BGF.Data</div>
+
       <div id="BGF.BtV.StampFilter" style="width:100%;">BGF.StampFilter</div>
     </td>
     </td>
   </tr>
   </tr>
   <tr style="background:white" valign=top>
   <tr style="background:white" valign=top>
     <td id="Frame.Middle" width=100% valign=top>
     <td id="Frame.Middle" width=100% valign=top>
-
       <div id="BGF.BtV.Image.Main.Frame" style="width:100%;height:90vh;">BGF.Image.Main</div>
+
       <div id="BGF.BtV.Image.Main.Frame" style="width:100%;height:80vh;margin-bottom:8px">BGF.Image.Main</div>
-
       <div id="BGF.BtV.Sample.Edit.Frame" style="display:none;width:100%;height:90vh;">BGF.Image.Main</div>
+
       <div id="BGF.BtV.Sample.Edit.Frame" style="display:none;width:100%;;margin-bottom:8px">BGF.SampleEdit.Main</div>
 +
      <div id="BGF.BtV.FullImage.Frame" style="display:none;width:100%;height:80vh;;margin-bottom:8px">BGF.FullImage.Main</div>
     </td>
     </td>
     <td id="Frame.MiddleRight">
     <td id="Frame.MiddleRight">
-
       <table style="background:silver;" width=100% cellspacing=1 cellpadding=4>
+
       <div id="BGF.BtV.Samples.List.Frame" style="width:100%;height:80vh;">
-
        <tr style="background:#E0E0E0;" valign=top>
+
         <table style="background:silver;" width=100% cellspacing=1 cellpadding=4>
-
          <td style="padding:2px 6px 1px 6px"><b>Ausschnitte</b></td>
+
          <tr style="background:#E0E0E0;" valign=top>
-
        </tr>
+
            <td style="padding:2px 6px 1px 6px"><b>Ausschnitte</b></td>
-
        <tr style="background:#F8F8F8;" valign=top>
+
-
          <td style="padding:2px 6px 1px 6px">
+
-
            <button id="BGF.BtV.Sample.Add" type="button" onclick="BGF_BtV_OnClick(this)">Hinzufügen</button>
+
-
          </td>
+
-
        </tr>
+
-
        <tr style="background:#F8F8F8;" valign=top>
+
-
          <td>
+
-
            <div id="BGF.BtV.Samples.All" style="overflow:auto;height:90vh;width:100%;margin-top:4px;">BGF.Samples.All</div>
+
-
            <div id="BGF.BtV.Samples.Sel" style="overflow:auto;height:90vh;width:100%;margin-top:4px;display:none;">BGF.Samples.Sel</div>
+
-
          </td>
+
-
        </tr>
+
-
      </table>
+
-
    </td>
+
-
  </tr>
+
-
</table>
+
-
<hr/>
+
-
<b>Template "BGF.BtV.Sample.Template"</b><br>
+
-
<div id="BGF.BtV.Sample.Template">
+
-
  <div id="BGF.BtV.Sample.%%Sample.ID%%.div" style="width:100%;border:0px solid silver;margin:0px 0px 4px 0px;">
+
-
    <table style="background:#F8F8F8;margin:0px;" width=100% cellspacing=0 cellpadding=4>
+
-
      <tr valign=top>
+
-
        <td width=10px rowspan=3>
+
-
          <img src="%%Sample.FN%%" width="%%Settings.MaxSampleImgWidth%%"/>
+
-
        </td>
+
-
        <td width=2px rowspan=3>&nbsp;</td>
+
-
        <td>
+
-
          <b>%%Sample.ID%%</b> (%%Sample.IDSrc%%)<br>
+
-
        </td>
+
-
      </tr>
+
-
      <tr valign=top>
+
-
        <td height=100%>
+
-
          <table width=100% cellspacing=0 cellpadding=0>
+
-
            <tr valign=top>
+
-
              <td nowrap>Kat-Nr.:</td><td>&nbsp;</td><td width=100%>%%Stamp.KatNr%%%%Sample.KatNrVar%%</td>
+
-
            </tr>
+
-
            <tr valign=top>
+
-
              <td>BRS:    </td><td>&nbsp;</td><td width=100%>%%Sample.BRS%%</td>
+
-
            </tr>
+
-
            <tr valign=top>
+
-
              <td>Quelle: </td><td>&nbsp;</td><td width=100%>%%Sample.Source.TypeText%% %%Sample.Source.Name%%</td>
+
-
            </tr>
+
-
            <tr valign=top>
+
-
              <td>        </td><td>&nbsp;</td><td width=100%>%%Sample.Source.ArtNr%% (%%Sample.Source.Date%%)</td>
+
-
            </tr>
+
-
            <tr valign=top>
+
-
              <td>Größe:  </td><td>&nbsp;</td><td width=100%>%%Sample.ImageData.Width%% x %%Sample.ImageData.Height%%</td>
+
-
            </tr>
+
-
              <td>&nbsp;</td>
+
-
          </table>
+
-
        </td>
+
-
      </tr>
+
-
      <tr valign=top>
+
-
        <td>
+
-
          <button id="BGF.BtV.Sample.Edit.ID%%Sample.ID%%" type="button" onclick="BGF_BtV_OnClick(this)">Bearbeiten</button>&nbsp;&nbsp;
+
-
          <button id="BGF.BtV.Sample.Delete.ID%%Sample.ID%%" type="button" onclick="BGF_BtV_OnClick(this)">Löschen</button>
+
-
         </td>
+
-
      </tr>
+
-
    </table>
+
-
  </div>
+
-
</div>
+
-
<br>
+
-
<b>Template "BGF.BtV.Sample.Edit.Template"</b><br>
+
-
<div id="BGF.BtV.Sample.Edit.Template">
+
-
  <div id="BGF.BtV.Sample.Edit.div" style="width:100%;border:1px solid silver;margin:0px;">
+
-
    <table style="background:#F8F8F8;margin:0px;" width=100% cellspacing=0 cellpadding=4>
+
-
      <tr valign=top>
+
-
        <td width=10px>
+
-
          <img id="BGF.BtV.Sample.Edit.Image" src="/bogenwiki_bgf/BGF_Sample_Dummy_Image.jpg" width="200"/><br>
+
-
          <div id="BGF.BtV.Sample.Edit.Image.None">
+
-
            Kein Bild ausgewählt<br>
+
-
            <button id="BGF.BtV.Sample.Edit.Image.Select" type="button"
+
-
                    onclick="document.getElementById('BGF.BtV.Sample.Edit.Image.Upload').click();">Bild auswählen</button>
+
-
            <input id="BGF.BtV.Sample.Edit.Image.Upload" name="ImageUpload" type="file" size="20" accept="image/jpeg,image/png"
+
-
                  style="display:none;" onchange="BGF_BtV_OnChange(this)">
+
-
          </div>
+
-
          <div id="BGF.BtV.Sample.Edit.Image.Avail">
+
-
            <span id="BGF.BtV.Sample.Edit.Image.OrgFN">...</span>
+
-
            <button id="BGF.BtV.Sample.Edit.Image.Remove" type="button" onclick="BGF_BtV_OnClick(this)">Bild entfernen</button>
+
-
          </div>
+
-
        </td>
+
-
        <td width=2px>&nbsp;</td>
+
-
        <td>
+
-
          <table width=100% cellspacing=0 cellpadding=2>
+
-
            <tr valign=top>
+
-
              <td nowrap>ID Source:</td>
+
-
              <td>&nbsp;</td>
+
-
              <td width=100%>
+
-
                <select id="BGF.BtV.Sample.Edit.IDSrc" name="Gebiet" onchange="BGF_BtV_OnChange(this)">
+
-
                  <option value="BGF">Bogenforschung</option>
+
-
                  <option value="BV">Bestandsverwaltung</option>
+
-
                </select>
+
-
              </td>
+
-
            </tr>
+
-
            <tr valign=top>
+
-
              <td nowrap>ID:</td>
+
-
              <td>&nbsp;</td>
+
-
              <td width=100%>
+
-
                <input type="text" id="BGF.BtV.Sample.Edit.IDBGF" name="IDBGF" style="margin:0px" readonly>
+
-
                <select id="BGF.BtV.Sample.Edit.IDBV" name="IDBV" onchange="BGF_BtV_OnChange(this)">
+
-
                </select>
+
-
              </td>
+
-
            </tr>
+
-
            <tr valign=top>
+
-
              <td nowrap>Kat-Nr.:</td><td>&nbsp;</td>
+
-
              <td width=100%>
+
-
                <span id="BGF.BtV.Sample.Edit.KatNr">1234</span>
+
-
                <input type="text" id="BGF.BtV.Sample.Edit.KatNrVar" name="KatNrVar" size=10 style="margin:0px"
+
-
                      onchange="BGF_BtV_OnChange(this)">
+
-
              </td>
+
-
            </tr>
+
-
            <tr valign=top>
+
-
              <td nowrap>BRS:</td><td>&nbsp;</td>
+
-
              <td width=100%>
+
-
                <input type="text" id="BGF.BtV.Sample.Edit.BRSBGF" name="BRSBGF" style="margin:0px"
+
-
                      onchange="BGF_BtV_OnChange(this)" oninput="BGF_BtV_OnChange(this)">
+
-
                <div id="BGF.BtV.Sample.Edit.BRSBV"></div>
+
-
              </td>
+
-
            </tr>
+
-
            <tr valign=top>
+
-
              <td nowrap>Quelle:</td><td>&nbsp;</td>
+
-
              <td width=100%>
+
-
                <select id="BGF.BtV.Sample.Edit.SourceType" name="SourceType" onchange="BGF_BtV_OnChange(this)">
+
-
                  <option value="un">unbekannt</option>
+
-
                  <option value="eb">ebay</option>
+
-
                  <option value="ah">Auktionshaus</option>
+
-
                  <option value="fo">Forum</option>
+
-
                  <option value="sh">Shop</option>
+
-
                  <option value="pr">Privat</option>
+
-
                </select>
+
-
              </td>
+
-
            </tr>
+
-
            <tr valign=top>
+
-
              <td nowrap>&nbsp;&nbsp;Name:</td><td>&nbsp;</td>
+
-
              <td width=100%>
+
-
                <input type="text" id="BGF.BtV.Sample.Edit.SourceName" name="SourceName" style="margin:0px"
+
-
                      onchange="BGF_BtV_OnChange(this)" oninput="BGF_BtV_OnChange(this)">
+
-
              </td>
+
-
            </tr>
+
-
            <tr valign=top>
+
-
              <td nowrap>&nbsp;&nbsp;Art-Nr.:</td><td>&nbsp;</td>
+
-
              <td width=100%>
+
-
                <input type="text" id="BGF.BtV.Sample.Edit.SourceArtNr" name="SourceArtNr" style="margin:0px"
+
-
                      onchange="BGF_BtV_OnChange(this)" oninput="BGF_BtV_OnChange(this)">
+
-
              </td>
+
-
            </tr>
+
-
            <tr valign=top>
+
-
              <td nowrap>&nbsp;&nbsp;Datum:</td><td>&nbsp;</td>
+
-
              <td width=100%>
+
-
                <input type="date" id="BGF.BtV.Sample.Edit.SourceDate" name="SourceDate" style="margin:0px"
+
-
                      onchange="BGF_BtV_OnChange(this)" oninput="BGF_BtV_OnChange(this)">
+
-
              </td>
+
-
            </tr>
+
-
            <tr valign=top>
+
-
              <td colspan=3>
+
-
                <button id="BGF.BtV.Sample.Save" type="button" onclick="BGF_BtV_OnClick(this)">Speichern</button>&nbsp;&nbsp;
+
-
                <button id="BGF.BtV.Sample.Abort" type="button" onclick="BGF_BtV_OnClick(this)">Abbrechen</button>
+
-
              </td>
+
-
            </tr>
+
-
          </table>
+
-
        </td>
+
-
      </tr>
+
-
    </table>
+
-
  </div>
+
-
</div>
+
-
<br>
+
-
<b>Template "BGF.BtV.Data.Template"</b><br>
+
-
<div id="BGF.BtV.Data.Template">
+
-
  <div id="BGF.BtV.Data.div" style="width:500px;background:#F8F8F8;">
+
-
  <table style="background:silver;" width=100% cellspacing=1 cellpadding=4>
+
-
    <tr style="background:#E0E0E0;" valign=top>
+
-
      <td style="padding:2px 6px 1px 6px"><b>Auswahl / Filter</b></td>
+
-
    </tr>
+
-
    <tr style="background:#F8F8F8;" valign=top>
+
-
      <td>
+
-
        <table width=100% cellspacing=0 cellpadding=2>
+
-
          <tr valign=top>
+
-
            <td nowrap>Gebiet: </td><td>&nbsp;</td>
+
-
            <td width=100%>
+
-
              <select id="BGF.BtV.Data.Stamp.Gebiet" name="Gebiet" onchange="BGF_BtV_OnChange(this)">
+
-
                <option value="-">bitte auswählen</option>
+
-
                <option value="Bund">Bund</option>
+
-
                <option value="Berlin">Berlin</option>
+
-
                <option value="DDR">DDR</option>
+
-
                <option value="Saar">Saarland</option>
+
-
              </select>
+
-
            </td>
+
           </tr>
           </tr>
-
           <tr valign=top>
+
           <tr style="background:#F8F8F8;" valign=top>
-
             <td nowrap>Gebiet1:</td><td>&nbsp;</td>
+
             <td style="padding:2px 6px 1px 6px">
-
            <td width=100%>
+
              <button id="BGF.BtV.Sample.Add" type="button" onclick="BGF_BtV_OnClick(this)">Hinzufügen</button>&nbsp;&nbsp;
-
               <select id="BGF.BtV.Data.Stamp.Gebiet1" name="Gebiet1" onchange="BGF_BtV_OnChange(this)">
+
               <button id="BGF.BtV.Samples.ShowImageList" type="button" onclick="BGF_BtV_OnClick(this)"
-
                <option value="-">bitte auswählen</option>
+
                      style="border-style:inset;">IL</button>
-
                <option value=""></option>
+
              <button id="BGF.BtV.Samples.ShowCompactList" type="button" onclick="BGF_BtV_OnClick(this)">CL</button>
-
                <option value="SMBM">SMBM</option>
+
-
              </select>
+
             </td>
             </td>
           </tr>
           </tr>
-
           <tr valign=top>
+
           <tr style="background:#F8F8F8;" valign=top>
-
             <td nowrap>Kat-Nr.:</td><td>&nbsp;</td>
+
             <td>
-
            <td width=100%>
+
               <div id="BGF.BtV.Samples.ImageList" style="overflow:auto;height:75vh;width:100%;margin-top:4px;">
-
               <input type="number" id="BGF.BtV.Data.Stamp.KatNr" name="KatNr" min="1" max="9999" style="margin:0px"
+
                BGF.BtV.Samples.ImageList
-
                    onchange="BGF_BtV_OnChange(this)" oninput="BGF_BtV_OnChange(this)">&nbsp;
+
              </div>
-
              (<span id="BGF.BtV.Data.Stamp.KatNr.Min">min</span> - <span id="BGF.BtV.Data.Stamp.KatNr.Max">max</span>)&nbsp;
+
              <div id="BGF.BtV.Samples.CompactList" style="overflow:auto;height:75vh;width:100%;margin-top:4px;">  
-
              <button id="BGF.BtV.Data.OK" type="button" onclick="BGF_BtV_OnClick(this)">OK</button>
+
                BGF.BtV.Samples.CompactList
 +
              </div>
             </td>
             </td>
           </tr>
           </tr>
-
           <tr valign=top>
+
        </table>
-
             <td nowrap>BRS-Filter:</td><td>&nbsp;</td>
+
      </div>
-
             <td width=100%>
+
      <div id="BGF.BtV.Samples.Stat.Frame" style="display:none;width:100%;height:80vh;">
-
               <select id="BGF.BtV.Data.Stamp.Filter" name="Filter" onchange="BGF_BtV_OnChange(this)">
+
        <table style="background:silver;" width=100% cellspacing=1 cellpadding=4>
-
                 <option value="-">Kein Filter</option>
+
           <tr style="background:#E0E0E0;" valign=top>
-
               </select>
+
             <td style="padding:2px 6px 1px 6px"><b>Übersicht / Statistik</b></td>
 +
          </tr>
 +
          <tr style="background:#F8F8F8;" valign=top>
 +
             <td>
 +
               <div id="BGF.BtV.Samples.StatList" style="overflow:auto;height:80vh;width:100%;margin-top:4px;">
 +
                 BGF.BtV.Samples.StatList
 +
               </div>
             </td>
             </td>
           </tr>
           </tr>
         </table>
         </table>
-
       </td>
+
       </div>
-
     </tr>
+
     </td>
-
   </table>
+
   </tr>
-
  </div>
+
</table>
-
</div>
+
<script src="/bogenwiki_lib/bw_libaux.js"></script>
-
<script>
+
<script src="/bogenwiki_lib/bw_libdebug.js"></script>
-
  function BGF_BtV_OnSamplesLoad(aSampleData)
+
<script src="/bogenwiki_lib/bw_libgui.js"></script>
-
  {
+
<script src="/bogenwiki_bgf/src/bgf_btv.js"></script>
-
    sFilterOptions = '';
+
-
    for (b = 0; b < aSampleData.BRS.length; b++) {
+
-
      sFilterOptions += '<optgroup label="'+aSampleData.BRS[b].Type+'">'
+
-
                        +'<option label="alle ('+aSampleData.BRS[b].Count+')">'+aSampleData.BRS[b].Type
+
-
                        +':*</option>';
+
-
      for (k = 0; k < aSampleData.BRS[b].Keys.length; k++)
+
-
        sFilterOptions += '<option label="'+aSampleData.BRS[b].Type+' '+aSampleData.BRS[b].Keys[k].Key+' '
+
-
                          +'('+aSampleData.BRS[b].Keys[k].Count+')">'+aSampleData.BRS[b].Type+':'+aSampleData.BRS[b].Keys[k].Key
+
-
                          +'</option>';
+
-
      sFilterOptions += '</optgroup>';
+
-
    }
+
-
    document.getElementById('BGF.BtV.Data.Stamp.Filter').innerHTML = sFilterOptions;
+
-
    BGFShowSamples(aSampleData.Samples,{});
+
-
  }
+
-
  function BGF_BtV_ShowHideSample(sSampleID,bShow)
+
-
  {
+
-
    eSample = document.getElementById('BGF.BtV.Sample.'+sSampleID+'.div');
+
-
    if (eSample)
+
-
      eSample.style.display = (bShow ? 'inline-block' : 'none');
+
-
  }
+
-
  var BGF_BtV_Stamp = {};
+
-
  var BGF_BtV_Sample = {};
+
-
  var BGF_BtV_NewSampleIDs = {};
+
-
  var BGF_BtV_SelIDNewBVIdx = -1
+
-
  function BGF_BtV_SampleEditStart(Gebiet,Gebiet1,KatNr,Sample,NewSampleIDs)
+
-
  {
+
-
    BGF_BtV_Stamp = {Gebiet:Gebiet,Gebiet1:Gebiet1,KatNr:KatNr};
+
-
    BGF_BtV_Sample = Sample;
+
-
    BGF_BtV_NewSampleIDs = NewSampleIDs;
+
-
    var eSampleImageFrame = document.getElementById('BGF.BtV.Image.Main.Frame');
+
-
    var eSampleEditFrame = document.getElementById('BGF.BtV.Sample.Edit.Frame');
+
-
    var eSampleEditTemplate = document.getElementById('BGF.BtV.Sample.Edit.Template');
+
-
    var sInnerHTML = eSampleEditTemplate.innerHTML;
+
-
    eSampleEditFrame.innerHTML = sInnerHTML;
+
-
    document.getElementById('BGF.BtV.Sample.Edit.KatNr').innerHTML = BGF_BtV_Stamp.KatNr;
+
-
    document.getElementById('BGF.BtV.Sample.Edit.KatNrVar').value = Sample.KatNrVar;
+
-
    var eSampleIDSrc = document.getElementById('BGF.BtV.Sample.Edit.IDSrc');
+
-
    var eSampleIDBGF = document.getElementById('BGF.BtV.Sample.Edit.IDBGF');
+
-
    var eSampleIDBV = document.getElementById('BGF.BtV.Sample.Edit.IDBV');
+
-
    var eSampleBRSBGF = document.getElementById('BGF.BtV.Sample.Edit.BRSBGF');
+
-
    var eSampleBRSBV = document.getElementById('BGF.BtV.Sample.Edit.BRSBV');
+
-
    if (Sample.IDSrc != '') {
+
-
      eSampleIDSrc.value = Sample.IDSrc;
+
-
      eSampleIDSrc.disabled = true;
+
-
      eSampleIDBGF.value = Sample.ID;
+
-
      eSampleIDBGF.style.display = 'inline-block';
+
-
      eSampleIDBV.style.display = 'none';
+
-
      var sBRS = '';
+
-
      for (b = 0; b < Sample.BRS.length; b++)
+
-
        sBRS += (sBRS!='' ? ', ' : '')+Sample.BRS[b].Type+' '+Sample.BRS[b].Key;
+
-
      eSampleBRSBGF.value = sBRS;
+
-
      eSampleBRSBGF.style.display = 'inline-block';
+
-
      eSampleBRSBV.style.display = 'none';
+
-
    } else {
+
-
      eSampleIDSrc.value = 'BGF';
+
-
      eSampleIDBGF.value = NewSampleIDs.BGF;
+
-
      var sInnerHTML = '';
+
-
      for (i = 0; i < NewSampleIDs.BV.length; i++)
+
-
        sInnerHTML += '<option value="'+i+'">'+NewSampleIDs.BV[i].ID+'</option>';
+
-
      eSampleIDBV.innerHTML = sInnerHTML;
+
-
      eSampleIDBGF.style.display = 'inline-block';
+
-
      eSampleIDBV.style.display = 'none';
+
-
      eSampleBRSBGF.style.display = 'inline-block';
+
-
      eSampleBRSBV.style.display = 'none';
+
-
    }
+
-
    document.getElementById('BGF.BtV.Sample.Edit.SourceType').value = (Sample.Source.Type=='' ? 'un' : Sample.Source.Type);
+
-
    document.getElementById('BGF.BtV.Sample.Edit.SourceName').value = Sample.Source.Name;
+
-
    document.getElementById('BGF.BtV.Sample.Edit.SourceArtNr').value = Sample.Source.ArtNr;
+
-
    document.getElementById('BGF.BtV.Sample.Edit.SourceDate').value = Sample.Source.Date;
+
-
    document.getElementById('BGF.BtV.Sample.Edit.SourceDate')
+
-
    sImageFN = BGFGetImageFN({Gebiet:Gebiet,Gebiet1:Gebiet1,KatNr:KatNr},Sample);
+
-
    document.getElementById('BGF.BtV.Sample.Edit.Image').src = sImageFN;
+
-
    if (Sample.OrgFN != '') {
+
-
      document.getElementById('BGF.BtV.Sample.Edit.Image.OrgFN').innerHTML = Sample.OrgFN;
+
-
      document.getElementById('BGF.BtV.Sample.Edit.Image.None').style.display = 'none';
+
-
      document.getElementById('BGF.BtV.Sample.Edit.Image.Avail').style.display = 'inline';
+
-
    } else {
+
-
      document.getElementById('BGF.BtV.Sample.Edit.Image.None').style.display = 'inline';
+
-
      document.getElementById('BGF.BtV.Sample.Edit.Image.Avail').style.display = 'none';
+
-
    }
+
-
    eSampleImageFrame.style.display = 'none';
+
-
    eSampleEditFrame.style.display = 'inline-block';
+
-
  }
+
-
  function BGF_BtV_OnChange(eElement)
+
-
  {
+
-
    var eGebiet  = document.getElementById('BGF.BtV.Data.Stamp.Gebiet');
+
-
    var eGebiet1  = document.getElementById('BGF.BtV.Data.Stamp.Gebiet1');
+
-
    var eKatNr    = document.getElementById('BGF.BtV.Data.Stamp.KatNr');
+
-
    var eFilter  = document.getElementById('BGF.BtV.Data.Stamp.Filter');
+
-
    console.log('[BGF_BtV_OnChange] eElement.id='+eElement.id);
+
-
    switch (eElement.id) {
+
-
      case 'BGF.BtV.Data.Stamp.Gebiet':
+
-
        switch (eGebiet.value) {
+
-
          case 'Bund':  eKatNr.min = 111; eKatNr.max = 1793; break;
+
-
          case 'Berlin': eKatNr.min = 1;  eKatNr.max = 879; break;
+
-
          case 'DDR':    eKatNr.min = 242; eKatNr.max = 3365; break;
+
-
          case 'Saar':  eKatNr.min = 380; eKatNr.max = 448; break;
+
-
        }
+
-
        document.getElementById('BGF.BtV.Data.Stamp.KatNr.Min').innerHTML = eKatNr.min;
+
-
        document.getElementById('BGF.BtV.Data.Stamp.KatNr.Max').innerHTML = eKatNr.max;
+
-
        var nKatNr = parseInt(eKatNr.value,10);
+
-
        if ((nKatNr < parseInt(eKatNr.min,10)) || (nKatNr > parseInt(eKatNr.max,10)))
+
-
          eKatNr.style.color = 'red';
+
-
        else
+
-
          eKatNr.style.color = 'black';
+
-
        eGebiet1.value = '';
+
-
        break;
+
-
      case 'BGF.BtV.Data.Stamp.Gebiet1':
+
-
        break;
+
-
      case 'BGF.BtV.Data.Stamp.KatNr':
+
-
        //console.log('typeof(value)='+typeof(eKatNr.value)+'; typeof(min)='+typeof(eKatNr.min)+';');
+
-
        var nKatNr = parseInt(eKatNr.value,10);
+
-
        if ((nKatNr < parseInt(eKatNr.min,10)) || (nKatNr > parseInt(eKatNr.max,10)))
+
-
          eKatNr.style.color = 'red';
+
-
        else
+
-
          eKatNr.style.color = 'black';
+
-
        break;
+
-
      case 'BGF.BtV.Data.Stamp.Filter':
+
-
        var sGebiet  = document.getElementById('BGF.BtV.Data.Stamp.Gebiet').value;
+
-
        var sGebiet1  = document.getElementById('BGF.BtV.Data.Stamp.Gebiet1').value;
+
-
        var sKatNr    = document.getElementById('BGF.BtV.Data.Stamp.KatNr').value;
+
-
        var sFilter  = document.getElementById('BGF.BtV.Data.Stamp.Filter').value;
+
-
        BGF_BtV_StampFilterChanged(sGebiet,sGebiet1,sKatNr,sFilter);
+
-
        break;
+
-
      case 'BGF.BtV.Sample.Edit.IDSrc':
+
-
        var eSampleIDBGF = document.getElementById('BGF.BtV.Sample.Edit.IDBGF');
+
-
        var eSampleIDBV = document.getElementById('BGF.BtV.Sample.Edit.IDBV');
+
-
        var eSampleBRSBGF = document.getElementById('BGF.BtV.Sample.Edit.BRSBGF');
+
-
        var eSampleBRSBV = document.getElementById('BGF.BtV.Sample.Edit.BRSBV');
+
-
        var sIDSrc = document.getElementById('BGF.BtV.Sample.Edit.IDSrc').value;
+
-
        if (sIDSrc == 'BGF') {
+
-
          eSampleIDBGF.style.display = 'inline-block';
+
-
          eSampleIDBV.style.display = 'none';
+
-
          eSampleBRSBGF.style.display = 'inline-block';
+
-
          eSampleBRSBV.style.display = 'none';
+
-
          document.getElementById('BGF.BtV.Sample.Edit.KatNrVar').removeAttribute("readonly");
+
-
          document.getElementById('BGF.BtV.Sample.Edit.SourceType').removeAttribute("readonly");
+
-
          document.getElementById('BGF.BtV.Sample.Edit.SourceName').removeAttribute("readonly");
+
-
          document.getElementById('BGF.BtV.Sample.Edit.SourceArtNr').removeAttribute("readonly");
+
-
          document.getElementById('BGF.BtV.Sample.Edit.SourceDate').removeAttribute("readonly");
+
-
          document.getElementById('BGF.BtV.Sample.Edit.BRSBGF').value = '';
+
-
          document.getElementById('BGF.BtV.Sample.Edit.KatNrVar').value = '';
+
-
          document.getElementById('BGF.BtV.Sample.Edit.SourceType').value = 'un';
+
-
          document.getElementById('BGF.BtV.Sample.Edit.SourceName').value = '';
+
-
          document.getElementById('BGF.BtV.Sample.Edit.SourceArtNr').value = '';
+
-
          document.getElementById('BGF.BtV.Sample.Edit.SourceDate').value = '';
+
-
        } else {
+
-
          eSampleIDBGF.style.display = 'none';
+
-
          eSampleIDBV.style.display = 'inline-block';
+
-
          eSampleBRSBGF.style.display = 'none';
+
-
          eSampleBRSBV.style.display = 'inline-block';
+
-
          document.getElementById('BGF.BtV.Sample.Edit.KatNrVar').setAttribute("readonly",true);
+
-
          document.getElementById('BGF.BtV.Sample.Edit.SourceType').setAttribute("readonly",true);
+
-
          document.getElementById('BGF.BtV.Sample.Edit.SourceName').setAttribute("readonly",true);
+
-
          document.getElementById('BGF.BtV.Sample.Edit.SourceArtNr').setAttribute("readonly",true);
+
-
          document.getElementById('BGF.BtV.Sample.Edit.SourceDate').setAttribute("readonly",true);
+
-
          BGF_BtV_OnChange(document.getElementById('BGF.BtV.Sample.Edit.IDBV'));
+
-
        }
+
-
        break;
+
-
      case 'BGF.BtV.Sample.Edit.IDBV':
+
-
        var sNewID = document.getElementById('BGF.BtV.Sample.Edit.IDBV').value;
+
-
        BGF_BtV_SelIDNewBVIdx = parseInt(sNewID,10);
+
-
        console.log('[BGF_BtV_OnChange] BGF_BtV_SelIDNewBVIdx='+BGF_BtV_SelIDNewBVIdx+'; '
+
-
                  +'BV['+BGF_BtV_SelIDNewBVIdx+'].ID='+BGF_BtV_NewSampleIDs.BV[BGF_BtV_SelIDNewBVIdx].ID+';');
+
-
        var sInnerHTMLBRSBV = '';
+
-
        for (b = 0; b < BGF_BtV_NewSampleIDs.BV[BGF_BtV_SelIDNewBVIdx].BRS.length; b++) {
+
-
          var sBRS = BGF_BtV_NewSampleIDs.BV[BGF_BtV_SelIDNewBVIdx].BRS[b].Type+' '
+
-
                    +BGF_BtV_NewSampleIDs.BV[BGF_BtV_SelIDNewBVIdx].BRS[b].Key;
+
-
          sInnerHTMLBRSBV += '<input type="checkbox" id="BGF.BtV.Sample.Edit.BRSBV.'+b+'" name="BRSBV.'+b+'" value="'+sBRS+'">'
+
-
                            +'<label for="BGF.BtV.Sample.Edit.BRSBV.'+b+'">'+sBRS+'</label><br>';
+
-
        }
+
-
        document.getElementById('BGF.BtV.Sample.Edit.BRSBV').innerHTML = sInnerHTMLBRSBV;
+
-
        document.getElementById('BGF.BtV.Sample.Edit.BRSBGF').style.display = 'none';
+
-
        document.getElementById('BGF.BtV.Sample.Edit.KatNrVar').value = BGF_BtV_NewSampleIDs.BV[BGF_BtV_SelIDNewBVIdx].Unterart;
+
-
        document.getElementById('BGF.BtV.Sample.Edit.SourceType').value = BGF_BtV_NewSampleIDs.BV[BGF_BtV_SelIDNewBVIdx].Source.Type;
+
-
        document.getElementById('BGF.BtV.Sample.Edit.SourceName').value = BGF_BtV_NewSampleIDs.BV[BGF_BtV_SelIDNewBVIdx].Source.Name;
+
-
        document.getElementById('BGF.BtV.Sample.Edit.SourceArtNr').value = BGF_BtV_NewSampleIDs.BV[BGF_BtV_SelIDNewBVIdx].Source.ArtNr;
+
-
        document.getElementById('BGF.BtV.Sample.Edit.SourceDate').value = BGF_BtV_NewSampleIDs.BV[BGF_BtV_SelIDNewBVIdx].Source.Date;
+
-
        break;
+
-
      case 'BGF.BtV.Sample.Edit.SourceType':
+
-
        if (document.getElementById('BGF.BtV.Sample.Edit.IDSrc').value == 'BV')
+
-
          document.getElementById('BGF.BtV.Sample.Edit.SourceType').value = BGF_BtV_NewSampleIDs.BV[BGF_BtV_SelIDNewBVIdx].Source.Type;
+
-
        break;
+
-
      case 'BGF.BtV.Sample.Edit.BRSBGF':
+
-
      case 'BGF.BtV.Sample.Edit.KatNrVar':
+
-
      case 'BGF.BtV.Sample.Edit.SourceName':
+
-
      case 'BGF.BtV.Sample.Edit.SourceArtNr':
+
-
      case 'BGF.BtV.Sample.Edit.SourceDate':
+
-
        break;
+
-
      case 'BGF.BtV.Sample.Edit.Image.Upload':
+
-
        alert('eElement.files[0].length='+eElement.files[0].length);
+
-
        if (eElement.files[0].length > 0) {
+
-
          document.getElementById('BGF.BtV.Sample.Edit.Image.OrgFN').innerHTML = eElement.files[0].name;
+
-
          document.getElementById('BGF.BtV.Sample.Edit.Image.None').style.display = 'none';
+
-
          document.getElementById('BGF.BtV.Sample.Edit.Image.Avail').style.display = 'inline';
+
-
          var reader = new FileReader();
+
-
          reader.onload = (function (theFile) {
+
-
            return function (e) {
+
-
              document.getElementById('BGF.BtV.Sample.Edit.Image').src = e.target.result;
+
-
              //document.getElementById('BGF.BtV.Sample.Edit.Image').title = theFile.name;
+
-
            };
+
-
          })(eElement.files[0]);
+
-
          // Bild als Data URL auslesen.
+
-
          reader.readAsDataURL(eElement.files[0]);
+
-
        } else {
+
-
          document.getElementById('BGF.BtV.Sample.Edit.Image.None').style.display = 'inline';
+
-
          document.getElementById('BGF.BtV.Sample.Edit.Image.Avail').style.display = 'none';
+
-
        }
+
-
        break;
+
-
      default:
+
-
        alert('[BGF_BtV_OnChange] Unknown element ID "'+eElement.id+'" !!!');
+
-
        break;
+
-
    }
+
-
  }
+
-
  function BGF_BtV_OnClick(eElement)
+
-
  {
+
-
    console.log('[BGF_BtV_OnClick] eElement.id='+eElement.id);
+
-
    var sElementID = eElement.id;
+
-
    var sSampleID = '';
+
-
    if (sElementID.indexOf('BGF.BtV.Sample.Edit.ID') == 0) {
+
-
      sSampleID = sElementID.substring(('BGF.BtV.Sample.Edit.ID').length);
+
-
      sElementID = 'BGF.BtV.Sample.Edit';
+
-
    }
+
-
    if (sElementID.indexOf('BGF.BtV.Sample.Delete.ID') == 0) {
+
-
      sSampleID = sElementID.substring(('BGF.BtV.Sample.Delete.ID').length);
+
-
      sElementID = 'BGF.BtV.Sample.Delete';
+
-
    }
+
-
    switch (sElementID) {
+
-
      case 'BGF.BtV.Data.OK':
+
-
        var sGebiet  = document.getElementById('BGF.BtV.Data.Stamp.Gebiet').value;
+
-
        var sGebiet1  = document.getElementById('BGF.BtV.Data.Stamp.Gebiet1').value;
+
-
        var sKatNr    = document.getElementById('BGF.BtV.Data.Stamp.KatNr').value;
+
-
        console.log('[BGF_BtV_OnClick] sGebiet="'+sGebiet+'"; sGebiet1="'+sGebiet1+'"; sKatNr="'+sKatNr+'";');
+
-
        var bValuesOK = true;
+
-
        bValuesOK = (sGebiet == '-' ? false : bValuesOK);
+
-
        bValuesOK = (sKatNr == '' ? false : bValuesOK);
+
-
        if (bValuesOK)
+
-
          BGF_BtV_StampFilterChanged(sGebiet,sGebiet1,sKatNr,'');
+
-
        break;
+
-
      case 'BGF.BtV.Sample.Add':
+
-
        BGF_BtV_SampleNew();
+
-
        break;
+
-
      case 'BGF.BtV.Sample.Save':
+
-
        var NewSample = BGFInitSample();
+
-
        NewSample.IDSrc = document.getElementById('BGF.BtV.Sample.Edit.IDSrc').value;
+
-
        if (NewSample.IDSrc == 'BGF') {
+
-
          NewSample.ID = document.getElementById('BGF.BtV.Sample.Edit.IDBGF').value;
+
-
          var sSampleBRS = document.getElementById('BGF.BtV.Sample.Edit.BRSBGF').value;
+
-
          console.log('sSampleBRS="'+sSampleBRS+'"');
+
-
          var aSampleBRS = sSampleBRS.split(',');
+
-
          for (b = 0; b < aSampleBRS.length; b++) {
+
-
            console.log('aSampleBRS['+b+']="'+aSampleBRS[b]+'"');
+
-
            var sBRSType = aSampleBRS[b].substring(0,aSampleBRS[b].indexOf(' '));
+
-
            var sBRSKey = aSampleBRS[b].substring(sBRSType.length+1);
+
-
            console.log('sBRSType="'+sBRSType+'"; sBRSKey="'+sBRSKey+'"');
+
-
            NewSample.BRS.push({Type:sBRSType,Key:sBRSKey,Text:'',Pos:[]});
+
-
          }
+
-
          NewSample.KatNrVar = document.getElementById('BGF.BtV.Sample.Edit.KatNrVar').value;
+
-
          NewSample.Source.Type = document.getElementById('BGF.BtV.Sample.Edit.SourceType').value;
+
-
          NewSample.Source.Name = document.getElementById('BGF.BtV.Sample.Edit.SourceName').value;
+
-
          NewSample.Source.ArtNr = document.getElementById('BGF.BtV.Sample.Edit.SourceArtNr').value;
+
-
          NewSample.Source.Date = document.getElementById('BGF.BtV.Sample.Edit.SourceDate').value;
+
-
        } else {
+
-
          NewSample.ID = BGF_BtV_NewSampleIDs.BV[BGF_BtV_SelIDNewBVIdx].ID;
+
-
          console.log('[BGF_BtV_OnClick] BGF_BtV_NewSampleIDs.BV[BGF_BtV_SelIDNewBVIdx].BRS.length='
+
-
                      +BGF_BtV_NewSampleIDs.BV[BGF_BtV_SelIDNewBVIdx].BRS.length);
+
-
          for (b = 0; b < BGF_BtV_NewSampleIDs.BV[BGF_BtV_SelIDNewBVIdx].BRS.length; b++) {
+
-
            var aBRSBV = BGF_BtV_NewSampleIDs.BV[BGF_BtV_SelIDNewBVIdx].BRS[b];
+
-
            var eBRSBV = document.getElementById('BGF.BtV.Sample.Edit.BRSBV.'+b);
+
-
            console.log('[BGF_BtV_OnClick] eBRSBV.checked='+eBRSBV.checked);
+
-
            if (document.getElementById('BGF.BtV.Sample.Edit.BRSBV.'+b).checked)
+
-
              NewSample.BRS.push({Type:aBRSBV.Type,Key:aBRSBV.Key,Text:'',Pos:[]});
+
-
          }
+
-
          NewSample.KatNrVar = document.getElementById('BGF.BtV.Sample.Edit.KatNrVar').value;
+
-
          NewSample.Source.Type = '';
+
-
          NewSample.Source.Name = '';
+
-
          NewSample.Source.ArtNr = '';
+
-
          NewSample.Source.Date = '';
+
-
        }
+
-
        var files = document.getElementById('BGF.BtV.Sample.Edit.Image.Upload').files;
+
-
        if (files.length > 0)
+
-
          NewSample.OrgFN = files[0].name;
+
-
        // Sample speichern
+
-
        BGFSampleSave(NewSample);
+
-
        if (files.length > 0) {
+
-
          // Bild/Ausschnitt hochladen
+
-
          // Create formdata
+
-
          var formData = new FormData();
+
-
          // Add meta-data of the sample to formdata
+
-
          formData.append('WI', NewSample.ID);
+
-
          formData.append('_WU', wgUserName);
+
-
          formData.append('_GE', BGF_BtV_Stamp.Gebiet);
+
-
          formData.append('_GE1', BGF_BtV_Stamp.Gebiet1);
+
-
          formData.append('_KN', BGF_BtV_Stamp.KatNr);
+
-
          // Add file to formdata
+
-
          formData.append('files[]', files[0]);
+
-
          // Send formdata
+
-
          fetch('/bogenwiki_bgf/src/BGFWriteImage.php', {
+
-
            method: 'POST',
+
-
            body: formData
+
-
          }).then(response => {
+
-
            // Callback for response
+
-
            console.log('response.status="'+response.status+'"');
+
-
            console.log('response.statusText="'+response.statusText+'"');
+
-
            //var eUploadLog = document.getElementById('bvbfBgScanUploadLog');
+
-
            //eUploadLog.innerHTML = '<span style="color:green;font-weight:bold;">fertig</span>';
+
-
            document.getElementById('BGF.BtV.Sample.Edit.Image').src = BGFGetImageFN(BGF_BtV_Stamp,NewSample);
+
-
          });
+
-
        }
+
-
        var eSampleImageFrame = document.getElementById('BGF.BtV.Image.Main.Frame');
+
-
        var eSampleEditFrame = document.getElementById('BGF.BtV.Sample.Edit.Frame');
+
-
        eSampleImageFrame.style.display = 'inline-block';
+
-
        eSampleEditFrame.style.display = 'none';
+
-
        break;
+
-
      case 'BGF.BtV.Sample.Abort':
+
-
        var eSampleImageFrame = document.getElementById('BGF.BtV.Image.Main.Frame');
+
-
        var eSampleEditFrame = document.getElementById('BGF.BtV.Sample.Edit.Frame');
+
-
        eSampleImageFrame.style.display = 'inline-block';
+
-
        eSampleEditFrame.style.display = 'none';
+
-
        BGF_BtV_Stamp = {};
+
-
        BGF_BtV_Sample = {};
+
-
        BGF_BtV_NewSampleIDs = {};
+
-
        BGF_BtV_SelIDNewBVIdx = -1
+
-
        break;
+
-
      case 'BGF.BtV.Sample.Edit':
+
-
        BGFSampleEdit(sSampleID);
+
-
        break;
+
-
      case 'BGF.BtV.Sample.Edit.Image.Remove':
+
-
        document.getElementById('BGF.BtV.Sample.Edit.Image.None').style.display = 'inline';
+
-
        document.getElementById('BGF.BtV.Sample.Edit.Image.Avail').style.display = 'none';
+
-
        var eUpload = document.getElementById('BGF.BtV.Sample.Edit.Image.Upload');
+
-
        try {
+
-
          eUpload.value = null;
+
-
        } catch(ex) { }
+
-
        if (eUpload.value) {
+
-
          eUpload.parentNode.replaceChild(eUpload.cloneNode(true), eUpload);
+
-
        }
+
-
        break;
+
-
      default:
+
-
        alert('[BGF_BtV_OnClick] Unknown element ID "'+eElement.id+'" !!!');
+
-
        break;
+
-
    }
+
-
  }
+
-
</script>
+
<script src="/bogenwiki_bgf/src/bgf_lib.js"></script>
<script src="/bogenwiki_bgf/src/bgf_lib.js"></script>
<script>
<script>
-
   BGF_BtV_Init(wgUserName,wgUserGroups);
+
   BGF_BtV_ViewOptions.Templates.OnLoadFinished = BGFOnTemplatesLoaded;
 +
  BGF_BtV_ViewOptions.Templates.LoadFromFile("/bogenwiki_bgf/src/bgf_btv_templates.html");
 +
  BGFInit(wgUserName,wgUserGroups,BGF_BtV_DoRender);
 +
  window.onresize = BGF_BtV_OnWindowRezise;
 +
  window.addEventListener("storage", (e) => {
 +
    if (e.key == 'BGF_BTV_Filter') BGF_BtV_CheckCmdFromStorage();
 +
  });
</script>
</script>
</html>
</html>

Aktuelle Version vom 11:29, 19. Jan. 2025

Menü
BGF.Menu
BGF.StampFilter
BGF.Image.Main
Ausschnitte
  
BGF.BtV.Samples.ImageList
BGF.BtV.Samples.CompactList